Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : ASP : ADO/ODBC : Passing a veriable Signup · Login
Author Thread
Passing a veriable
Posted in tutorial: Running Stored Queries in Access Database
·  Ganash
User
Joined: 25 Jul 2003
Total Posts: 1
Passing a veriable
Posted: 25 Jul 2003
I am running a stored query from the asp page, if I use a string it works 100% I just want to know how to use a veriable instaed of a string. My veriable is assigned from a form and works, if I Response.Write it gives me the data entered in the form. I am very new to ASP and I know this is a simple thing but I cannot get it to work.

' executing stored procedure
Set mos = con.Execute ("exec sqfind '64-12345-00'") --works


' executing stored procedure
Set mos = con.Execute ("exec sqfind 'veriable'") ---- where varaible in my variable?

Thanks for the great articles, they have helped me quite a lot.


Thanks
·  Trope
User
Joined: 2 Aug 2003
Total Posts: 1
Passing A Variable Solution
Posted: 3 Aug 2003
Try this:

' Set your variable here
myVariable = "64-12345-00"

' Build Stored Proc String
strStoredProc = "exec sqfind '" & myVariable & "'"

' Call the Stored Proc
con.Execute strStoredProc

That should do it! Regards,

Giovanni

Users Who Have Visited This Thread In Last 24 Hours
3 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.