Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

what is the function to pass parameter?

Posted on 2006-11-13
4
Medium Priority
?
232 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

715 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