E
Edward
Until recently my clients' ancient legacy Access application has
worked fine.
However, their IT department installed Office 2010 and the legacy app
is broken (it was last developed in Access 2003).
I've managed to get most of it working, but there's one strange thing
that bugs me somewhat.
I have some code to create an ADODB.Connection. Here's the code:
<code>
Private Function modOpenOLEDBConnection(ByRef rconSQL As
ADODB.Connection, _
ByVal vstrOLEDBString As
String) As Boolean
On Error GoTo HandleErr
' Set the return value
modOpenOLEDBConnection = False
' Open ADO connection
rconSQL.ConnectionString = vstrOLEDBString
rconSQL.Properties("Prompt") = adPromptComplete
rconSQL.Open
modOpenOLEDBConnection = True
</code>
At this point I know what the connection string is for the
ADODB.Connection object, and I store it for later use upon returning
from the function.
However, I notice that in the version of ADODB (6.1) that I'm using,
the connection string does NOT contain the Password component,
Provider=SQLOLEDB.1;User ID=USER1;Data Source=SERVER1;Use Procedure
for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
ID=UNKNOWN;Use Encryption for Data=False;Tag with column collation
when possible=False;
whereas the old version (2.8) did.
Provider=SQLOLEDB.1;Password=PASSWORD1;User ID=USER1;Data
Source=SERVER1;Current Language=British;Use Procedure for
Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
ID=UNKNOWN;Use Encryption for Data=False;Tag with column collation
when possible=False
This means that I can't store and reuse the connection string for
later ADO operations.
Does anyone know of a fix for this?
Thanks
Edward
worked fine.
However, their IT department installed Office 2010 and the legacy app
is broken (it was last developed in Access 2003).
I've managed to get most of it working, but there's one strange thing
that bugs me somewhat.
I have some code to create an ADODB.Connection. Here's the code:
<code>
Private Function modOpenOLEDBConnection(ByRef rconSQL As
ADODB.Connection, _
ByVal vstrOLEDBString As
String) As Boolean
On Error GoTo HandleErr
' Set the return value
modOpenOLEDBConnection = False
' Open ADO connection
rconSQL.ConnectionString = vstrOLEDBString
rconSQL.Properties("Prompt") = adPromptComplete
rconSQL.Open
modOpenOLEDBConnection = True
</code>
At this point I know what the connection string is for the
ADODB.Connection object, and I store it for later use upon returning
from the function.
However, I notice that in the version of ADODB (6.1) that I'm using,
the connection string does NOT contain the Password component,
Provider=SQLOLEDB.1;User ID=USER1;Data Source=SERVER1;Use Procedure
for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
ID=UNKNOWN;Use Encryption for Data=False;Tag with column collation
when possible=False;
whereas the old version (2.8) did.
Provider=SQLOLEDB.1;Password=PASSWORD1;User ID=USER1;Data
Source=SERVER1;Current Language=British;Use Procedure for
Prepare=1;Auto Translate=True;Packet Size=4096;Workstation
ID=UNKNOWN;Use Encryption for Data=False;Tag with column collation
when possible=False
This means that I can't store and reuse the connection string for
later ADO operations.
Does anyone know of a fix for this?
Thanks
Edward