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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Stored Procedure from DAO

Status
Not open for further replies.

Phailak

Programmer
Apr 10, 2001
142
CA
Hail,

How can I call a stored procedure on a SQL 7.0 DB from VB with DAO (have it in code for ADO but I need for DAO)? I don't want to convert everything to ADO even though I know ADO is better for SQL and DAO is more for Access...


Phailak
 

In the DAO help files (or section there of), look up ODBC Direct, and off the top of my head I think you can...
[tt]
SQLStringVariable = "exec Stored_Proc_Name " & Optional_Parameter & ", " & Optional_Parameter 'That is if the SP is expecting such parameters
DAODataBase.Execute SQLStringVariable 'DAOWorkSpace,DAODataBase,DAORecordset
[/tt]

You can use a the recordset if the SP is returning information (recordset)

Good Luck

 
Thanks,

I'll try that today, but sounds right...

Phailak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top