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!

Reference stored procedure in form (newbie)

Status
Not open for further replies.

projecttoday

Programmer
Feb 28, 2004
208
US
I'm using Access 2007 and SQL Server Express 2008. I have created an Access Data Project and a SQL Server database. I seem to be able to make a query for my forms' record source just like regular Access and it reads and updates my SQL Server tables. But I want to use a stored procedure. There doesn't seem to any way to specify a stored procedure in the record source. How can I bind my forms to a stored procedure?
 
That is not the right forum to ask.
Better ask in Access forum.

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
 
Stored Procedures are code, not tables, so you could not bind them.

You can call a SP, from a say a button, that could modify a table/query.

Simi

 
You mean there is no record source? Are the controls bound at all? How is a record saved? Can you give an example of code to read the data? Thank you.

 
An SP could return Nothing, a single variable or a table.
Each will be returned as result set. They can be read but not bound. If you want it to be bound you could read the set and insert it into an Access table or have the SP result into SQL table and bound that.

Here is a simple example


Just google "vba call stored procedure." for more examples.

Simi
 
Simi:

In an Access ADP you CAN bind A form to A Stored Procedure and Add/Edit/Delete records
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top