Solved

what is the function to pass parameter?

Posted on 2006-11-13
4
198 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groovy example issue 10 87
GUI builder for Eclipse? 8 27
Java DateChooser? 3 29
configure dependency in POM for new database 3 11
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

937 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

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now