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

Using Stored Procedures

Status
Not open for further replies.

fogal

Technical User
Aug 20, 2001
87
US
I have an Access .mdb front end database and have a sql 2000 backend. I have created stored procedures in the Sql Server for my database. How do I run these stored procedures from MS Access. Can I link them to forms etc...
I have read articles that talk about using sql pass through queries, but need more information on hoe to use stored procedures and views with access mdb's.
 
So far I've found:
create a sql pass through query
save odbc connection in properties to the sql server
then type:
Exec nameofstoredprocedure parameter1, parameter2 etc....

i.e where parameter is for eg what to insert if my sp is an insert sp.
The sql table is then updated, but access returns eror msg because no records returned. If you set return records property to false then an error msg occurs
 
How are you running the pass-thru query, show the vba code you are using.

SQL Server will return an informational for each insert and normally you don't want to deal with these. To turn off
Set NOCOUNT ON in your stored procedure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top