Article ID: 210323 - Last Review: June 28, 2004 - Revision: 2.0 ACC2000: Sample Code for Running Temporary SQL Pass-Through QueryThis article was previously published under Q210323 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies only to a Microsoft Access database (.mdb). SUMMARY
This article lists sample code that you can use to call and run a
temporary SQL pass-through query.
MORE INFORMATION
You can use the following sample Visual Basic code to call and run a
temporary SQL pass-through query: NOTE: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected. ?ExecuteSPT("sp_example","ODBC;")
Note that this code accepts SQL statements that are specific to the server
that you are using. Please refer to your server's documentation to
determine valid SQL statements for your server.
REFERENCESFor more information about pass-through queries, click Microsoft Access Help on the
Help menu, type send commands to an sql database using a pass-through query in the Office Assistant or
the Answer Wizard, and then click Search to view the topics
returned.
| Article Translations
|
Back to the top
