Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is it possible to run stored procedures in access 1

Status
Not open for further replies.

noober

IS-IT--Management
Oct 10, 2003
112
US
Is it possible to run stored procedures in access? I would like to do so between access and an informix database.
 
You can create a pass-through query in Access that calls a stored procedure in other database servers. You would use the same syntax as you would use in the other server.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks guys! I have been working with access for a couple of years but I never realized what a "passthru query" was! Works great!
 
Is there a way to pass parameters/variables into a passthrough query?
 
The method that I use is code that changes the SQL of the pass-through query. For instance if you have a form with text boxes: txtStartDate and txtEndDate. Your P-T query name is "qptMyPassthrough" and it has dates as parameters. Assuming a button to update the SQL of the query.

Dim strSQL as String
strSQL = "EXEC spMyStoredProc '" & Me.txtStartDate & _
"', '" & Me.txtEndDate & "'"
Currentdb.QueryDefs("qptMyPassthrough").SQL = strSQL



Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top