SQL Variables? [message #20608] |
Thu, 06 June 2002 13:00 |
StrangeLuck
Messages: 2 Registered: June 2002
|
Junior Member |
|
|
I was wondering if someone could tell me how I could save the result of a query as a variable? For example, if I have a query:
"SELECT emp_name FROM employees WHERE emp_id = '" & employeenumber & "'"
How can I save the result of that query to a variable in VBscript that I can then pass along to another INSERT string later on?
Thanks,
Corey
|
|
|
|
Re: SQL Variables? [message #20614 is a reply to message #20608] |
Fri, 07 June 2002 04:19 |
Balaji
Messages: 102 Registered: October 2000
|
Senior Member |
|
|
write a function which takes empno as the argument with return datatype as string variable . typically the return variable should give the employee name.
|
|
|
Re: SQL Variables? [message #20616 is a reply to message #20608] |
Fri, 07 June 2002 05:07 |
StrangeLuck
Messages: 2 Registered: June 2002
|
Junior Member |
|
|
But, how can I use this in Javascript? I am trying to make an ASP page which will take numeric variables from the submit page, match them with their text counterparts in an Access database via SQL and then insert the text counterparts along with two dates into a table in the same database.
So far, the ASP page works and submits the values to a new page for processing, but I cannot match the variables with the text counterparts and then submit them and two date variables to the table in the database.
Any help would be appreciated!
Thanks,
StrangeLuck
|
|
|