Access 2000 and SQL 2000 How do I pass a parameter to a stored procedure from ms access?
S SAC Jun 30, 2007 #1 Access 2000 and SQL 2000 How do I pass a parameter to a stored procedure from ms access?
O Ofer Cohen Jun 30, 2007 #2 Using the PassThrough Query it just as using the SQL analyser in the SQL Server. So you can use Exec SPName 23,'2/2/2007','MyStr' If you want to change the parameters from Access every time you run it, youll need to change it using code and then run the query MySQL = "Exec SPName 23,'2/2/2007','MyStr'" Application.CurrentDb.QueryDefs("QueryName").SQL = MySQL
Using the PassThrough Query it just as using the SQL analyser in the SQL Server. So you can use Exec SPName 23,'2/2/2007','MyStr' If you want to change the parameters from Access every time you run it, youll need to change it using code and then run the query MySQL = "Exec SPName 23,'2/2/2007','MyStr'" Application.CurrentDb.QueryDefs("QueryName").SQL = MySQL
S SAC Jul 3, 2007 #3 Thanks! Ofer Cohen said: Using the PassThrough Query it just as using the SQL analyser in the SQL Server. So you can use Exec SPName 23,'2/2/2007','MyStr' If you want to change the parameters from Access every time you run it, youll need to change it using code and then run the query MySQL = "Exec SPName 23,'2/2/2007','MyStr'" Application.CurrentDb.QueryDefs("QueryName").SQL = MySQL Click to expand...
Thanks! Ofer Cohen said: Using the PassThrough Query it just as using the SQL analyser in the SQL Server. So you can use Exec SPName 23,'2/2/2007','MyStr' If you want to change the parameters from Access every time you run it, youll need to change it using code and then run the query MySQL = "Exec SPName 23,'2/2/2007','MyStr'" Application.CurrentDb.QueryDefs("QueryName").SQL = MySQL Click to expand...