Pass a parameter to a stored procedure from ms access

  • Thread starter Thread starter SAC
  • Start date Start date
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
 
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
 
Back
Top