Hi use this function...
You will need to change the attributes to the actuals i.e.
if Sever/instance name is - VISHALK\VISHAKAU
Address:\\VISHALK\pipe\MSS
\\VISHALK is the Server m/c name
MSSQL$VISHAKAU is the sql server instance name
Database--> The database name
username is sa
pwd is blank
Private Sub RegisterDataSource()
Dim en As rdoEnvironment
Dim cnTest As rdoConnection
Dim strAttribs As String
' Build keywords string.
strAttribs = "Description=" _
& "SQL Server on server SEQUEL" _
& Chr$(13) & "OemToAnsi=No" _
& Chr$(13) & "SERVER=VISHALK\VISHAKAU" _
& Chr$(13) & "Network=DBNMPNTW" _
& Chr$(13) & "Database=TEST" _
& Chr$(13) & "Address=\\VISHALK\pipe\MS
' Create new registered DSN.
rdoEngine.rdoRegisterDataS
"SQL Server", True, strAttribs
' Open the database.
Set en = rdoEngine.rdoEnvironments(
Set cnTest = en.OpenConnection( _
dsname:="Example", _
Prompt:=rdDriverNoPrompt, _
Connect:="UID=sa;PWD=;")
End Sub
I have tested it and it works. You can find the Address (pipe address from Client Network Libraries alias tab in Microsoft SQL server program group.
Cheers,
Kaushik
Main Topics
Browse All Topics





by: itsvtkPosted on 2003-11-10 at 21:52:49ID: 9720213
Hello,
sers/fdb/r do.htm
Try with this link:
http://internettrash.com/u
All the best,
V.Thandava krishna