Solved

what is the function to pass parameter?

Posted on 2006-11-13
4
223 Views
Last Modified: 2010-03-31
Dear all,

Suppose i have variable which carried the value as below:

x="1234567";
y=100;

and below is what i read from database "record set":

rs(0) => ID-INFO X="%X%"  ==> i need to replace\pass %X% by 1234567
rs(1) => INFO-NO Y="%Y%" ==> i need to replace          %Y% with 100

thanks,


0
Comment
Question by:ikhmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 17936118
0
 

Author Comment

by:ikhmer
ID: 17936169
oh thanks, and let say i have

x="1234567";
y=100;
z=200;

and from my record set i'd like to replace any match value with x,y,z because it is not always
rs(0) -> rs(0) => ID-INFO X="%X%"  or rs(1) => INFO-NO Y="%Y%"

thanks,
0
 
LVL 92

Expert Comment

by:objects
ID: 17936186
s = s.replaceAll("%X%", x).replaceAll("%Y%", y).replaceAll("%Z%", z);
0
 

Author Comment

by:ikhmer
ID: 17936201
thank Q
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.
Suggested Courses

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question