Jim Lawrence (AccessD)
accessd at shaw.ca
Tue Nov 11 23:29:09 CST 2003
Hi Phil: The FE, in this case A2K has no bearing on whether the connection is established. The issues are with either the ODBC setup, driver or how the SQL server is setup. If the server is setup to access a 'Trusted' or NT/2000/2003 authentication, the connection will be as follows... code >>> Public Function GetConnected() as boolean Public mobjConn As ADODB.Connection Public gstrConnection As String On Error GoTo Err_NotConnected ' Initialize fail GetConnected = False ' Connecting to the SQL (7/2000) server gstrConnection = "Provider=SQLOLEDB; _ Initial Catalog=MyDatabaseName; _ Data Source=MyServer; _ Integrated Security=SSPI" 'Use the M$ security ' Test connection string Set mobjConn = New ADODB.Connection mobjConn.ConnectionString = gstrConnection mobjConn.Open ' This line succeeds or fails ' Success... GetConnected = True MsgBox "You are connected " Exit_GetConnected: Exit Sub Err_NotConnected: MsgBox "You are not connected " Resume Exit_GetConnected End Function >>> code Something simple like above will test the connection. It works for any version of Access. Note: The Access reference to the MS ADO has to be set first for this to run. HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Phil Jewett Sent: Tuesday, November 11, 2003 6:35 PM To: accessd at databaseadvisors.com Subject: [AccessD] Access 2002 insists on SQL Server trusted connection When I run my Access 2000 frontend on a Windows XP/Access 2002 box, the SQL Server 2000 login fails, insisting on the 'trusted connection' network login instead of the SQL Server authentication in the ODBC connection string. This was presumably fixed in MDAC 2.6 SP2 - but maybe only for Access 2000. It's still there for Access 2002! See http://support.microsoft.com/default.aspx?scid=kb;en-us;279526 for MS's info. Any help on this? Thanks, Phil Jewett _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com