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

Help Using SQL as a backend.

Status
Not open for further replies.

DiamondDust

Programmer
Aug 26, 2002
23
0
0
US
How do I link my acces Frontend Forms So that they use Queries in the SQL db rather than using queiries in the access db frontend with linked tables.
 
If you're using Access 2000, then read up on the subject of ADP projects. An Access adp project interacts directly with the tables, views or stored procedures in a SQL Server database.

A "gentler" approach if you have an existing Access mdb application is to use a "passthrough" query. From the query design window, create a new query, then select the Query, SQL Specific, Passthrough-Query menu options. At this point, simply:

a) type in the valid SQL Server syntax for the SQL you wish to run on the server
b) type in 'exec stpStoredProcedureName' (no quotes) to trigger the stored procedure on the server (add any arguments after the stp if required.

Display the query properties window, and make sure that you set the ODBCConnectString and ReturnRecords appropriately (the latter to Yes, if you're running a Select query; No if you;re posting an Insert/Update action). A little trick I use is to copy paste the ODBCConnectString from the equiv propery of a linked table which I temporarily set up, then blow away later. Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top