[AccessD] Get an updateable ADODB recordset form SQL Server

jeffrey.demulling at usbank.com jeffrey.demulling at usbank.com
Tue May 25 13:50:43 CDT 2010


John,

Here is a function I use:

Function strODRConnection() As String
    Dim strMessage As String
 
   On Error GoTo strODRConnection_Error

    strODRConnection = "Provider=SQLOLEDB.1;"
    strODRConnection = strODRConnection & "Persist Security Info=True;"
    strODRConnection = strODRConnection & "User ID=" & 
strGetTheCurrentUser & ";"
    strODRConnection = strODRConnection & "Initial Catalog=" & 
strGetSEIDatabase(strDataConnection) & ";"
    strODRConnection = strODRConnection & "Data Source=" & 
strGetSEIServerName(strDataConnection) & ";"
    strODRConnection = strODRConnection & "Trusted_Connection=Yes"

   On Error GoTo 0
   Exit Function

strODRConnection_Error:

    strMessage = "Error " & Err.Number & " (" & Err.Description & ") in 
procedure strODRConnection of Module mdlADOConnection."
    strMessage = strMessage & " Application will stop processing now." & 
vbNewLine
    strMessage = strMessage & "Please note or copy this error message and 
contact application developer for assistance."
    MsgBox strMessage, vbCritical + vbOKOnly, "Error"
    End
End Function

Jeffrey F. Demulling
Process Automation Support Group Manager
Corporate Trust Services
U.S. Bank
EP-MN-WS2N
60 Livingston Avenue
St. Paul, MN  55107-2292
jeffrey.demulling at usbank.com
651-495-3925 direct
651-495-8103 fax
7157680478 at txt.att.net pager




From:
jwcolby <jwcolby at colbyconsulting.com>
To:
Access Developers discussion and problem solving 
<accessd at databaseadvisors.com>
Date:
05/25/2010 01:47 PM
Subject:
[AccessD] Get an updateable ADODB recordset form SQL Server
Sent by:
accessd-bounces at databaseadvisors.com



I use a trusted connection (there is no username / password) for my sql 
server.  I need a connection 
string to do that from Access, and I am not finding that.

Anybody?

-- 
John W. Colby
www.ColbyConsulting.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation.



---------------------------------------------------------------------




More information about the AccessD mailing list