SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQLServer12-MS Access 03-Passthrough Queries
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

johnpapa
Starting Member

7 Posts

Posted - 12/13/2012 :  05:03:52  Show Profile  Reply with Quote
I have a project that requires the use of SQL Server (in place already) with A03 as the frontend. I've downloaded SQLServer Express 2012 for testing purposes and managed to successfully interface A03 with SQLServer using SQL Server Native Client 11.0. I use the following (ADO instead ODBC) to SELECT the contents of a table which I created in SQLServer Express 12. This code that NOT require a Linked table (dbo.tbl1) in the Access FE.


Dim con As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim sXMLResult As String
'OLE DB (ADO) Native CLient
con.ConnectionString = "Provider=SQLNCLI11;" _
         & "DataSource=MSSQLSERVER;" _
         & "Server=(local);" _
         & "Database=JP1;" _
         & "Uid=sa;" _
         & "Pwd=sapass;" _
         & "DataTypeCompatibility=80;" _
         & "MARS Connection=True;"
con.Open
Set rst.ActiveConnection = con
rst.Open "SELECT * FROM dbo.tbl1;", con, adOpenKeyset, adLockPessimistic
Set Me.Recordset = rst
con.Close
Set con = Nothing


To define a Passthrough query when using ODBC, I can define it in the query section and set the "ODBC Connect Str" property of the query to something like


ODBC;DSN=XXX;SERVER=YYY;



Do you know how to define Passthrough queries when using ADO instead of ODBC?

John

  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000