Article ID: 191085
Article Last Modified on 3/2/2005
select USER_NAME() select usertype,type,name from systypes where usertype<=100
Dim cnPubs As New ADODB.Connection
Dim rsAuthors As New ADODB.Recordset
Dim strConn As String, strSQL As String
strConn = "Provider=MSDASQL;Driver={SQL Server};" & _
"Server=MyServer;Database=pubs;UID=<username>;PWD=<strong password>;"
strSQL = "SELECT * FROM Authors"
cnPubs.CursorLocation = adUseClient
cnPubs.Open strConn
rsAuthors.Open strSQL, cnPubs, adOpenStatic, adLockReadOnly, adCmdText
Keywords: kbdatabase kbprb kbmdacnosweep KB191085