Re: different mdac, different sql server behaviour

From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 08:13:51 -0000

Hi

ODBC is part of MDAC and you are using the SQL Server ODBC driver.

John

<ace join_to ware@iinet.net.au (Tony Epton)> wrote in message
news:41ca1245.86557359@news.m.iinet.net.au...
> On Wed, 22 Dec 2004 17:24:03 -0000, "John Bell"
> <jbellnewsposts@hotmail.com> wrote:
>
>
>>> 2) which part of mdac am I using when access attaches to the SQL back
>>> end but all the work is still being done by the access front end ?
>>
>>You will be using the Jet engine to connect to your access
>>database and (probably) the oledb driver for SQL Server to connect to the
>>server (unless you are doing it though ODBC).
>
> Here is the code snippet I am using (the SQL case) (many thanks for
> previous assistance in this area)
>
> I have never really understood which driver I am using in this code -
> but would be nice to know if I am looking at mdac version issues.
>
> Could I ask someone to please eyeball my code and tell me which part
> of mdac is being used.
>
> For this routine, in the SQL case, the paramter "AttachPath" holds the
> server name and database name (eg
> "DATABASE=WFimporterWork;SERVER=SQLTESTSVR2;")
> - I am doing a DSNless connection
>
> Many thanks
> Tony
>
> Sub AttachATable(AttachPath, TableName, AttachName, strDatabaseType,
> varUid As Variant, varPwd As Variant)
> Dim MyTableDef As TableDef
> Set MyTableDef = currentDb().CreateTableDef()
> Dim strConnect As String
> Select Case strDatabaseType
> Case "SQL"
> strConnect = "ODBC;DRIVER={sql server};" & AttachPath
> & "TABLE=" & TableName & ";Trusted_Connection=No;"
> If IsNull(varUid) = False Then
> strConnect = strConnect & "UID=" & varUid & ";"
> End If
> If IsNull(varPwd) = False Then
> strConnect = strConnect & "PWD=" & varPwd & ";"
> End If
> MyTableDef.Connect = strConnect
> MyTableDef.Attributes = dbAttachSavePWD
> Case "MDB"
> MyTableDef.Connect = ";DATABASE=" + AttachPath
> AttachName = AttachName & "_mdb"
> End Select
> MyTableDef.SourceTableName = TableName
> MyTableDef.Name = AttachName
> currentDb().TableDefs.Append MyTableDef ' Attach table.
> End Sub



Relevant Pages

  • Re: Sql Server Agent (2000) erroring out on DTS Packages
    ... DTSRun: Package execution complete. ... and a problem with a missing MDAC dll. ... On Sql Server 7, this was SQLAgentCmdExec. ... Specified driver could not be loaded due to system error 126 (MERANT MSSS ...
    (microsoft.public.sqlserver.dts)
  • Re: ODBC - SQL Server image data problems with recent releases of ODBC
    ... there are two problems with build 824 with an upgraded ODBC ... The following code is a workaround for a problem in SQL Server ... The older SQL Server driver: ...
    (perl.dbi.users)
  • Re: ODBC call failed - weird behavior
    ... It could be an MDAC issue. ... checker on a machine where the app works and another machine ... You could also turn on ODBC tracing then reproduce your ... >ODBC tables to connect to an SQL Server 2000. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Linked Server Query Fails
    ... QODBC is an ODBC driver that was developed to communicate ... give me the power of SQL server to then manipulate the data as I need to do. ...
    (microsoft.public.data.oledb)
  • Re: Cant remove SQL native client ODBC connection
    ... NEVER install a beta, CTP or release candidate on any system that can't be formatted. ... Next, the SNAC provider is an OLE DB interface, not ODBC. ... Hitchhiker's Guide to Visual Studio and SQL Server ... "The setup routines for the SQL Server Native Client 10.0 ODBC driver could ...
    (microsoft.public.sqlserver.connect)

Loading