Solved

what is the function to pass parameter?

Posted on 2006-11-13
4
186 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
Comment Utility
0
 

Author Comment

by:ikhmer
Comment Utility
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
Comment Utility
s = s.replaceAll("%X%", x).replaceAll("%Y%", y).replaceAll("%Z%", z);
0
 

Author Comment

by:ikhmer
Comment Utility
thank Q
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

743 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

15 Experts available now in Live!

Get 1:1 Help Now