Re: different mdac, different sql server behaviour
From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 12/23/04
- Next message: Roger Abell: "Re: Cached Logon"
- Previous message: David Gugick: "Re: Why i can not see my harddisk drive - d drive"
- In reply to: Tony Epton: "Re: different mdac, different sql server behaviour"
- Next in thread: Keith Kratochvil: "Re: different mdac, different sql server behaviour"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Roger Abell: "Re: Cached Logon"
- Previous message: David Gugick: "Re: Why i can not see my harddisk drive - d drive"
- In reply to: Tony Epton: "Re: different mdac, different sql server behaviour"
- Next in thread: Keith Kratochvil: "Re: different mdac, different sql server behaviour"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|