Whing Dela Cruz
asked on
SQL 8 with vb6 network connection
Hi experts, I'm having difficulties in connecting database with sql 8 to a network or other pc. Codes below is working locally but when i try to run it via network an error occur, says; " Server does not exist" . Im using OS Widows 10. Thanks!
Sub eMiles(edate, db As String, rmrk As String)
Dim e As Save_Files
Set e = New Save_Files
e.OPEN_CON db, "SkyJob" & "\SQLEXPRESS"
e.RecordHistory edate, rmrk
e.CLOSE_CON
end sub
Public Sub OPEN_CON(db As String, ServerName As String)
Set cn = New ADODB.Connection
cn.Provider = "sqloledb"
cn.ConnectionTimeout = 12
cn.Properties("Data source").Value = Trim(ServerName)
cn.Properties("Initial Catalog").Value = Trim(db)
cn.Properties("User ID").Value = "sa"
cn.Properties("Password").Value = "100"
cn.CursorLocation = adUseClient
cn.Open , "sa", ""
If Err.Number <> 0 Then
MsgBox (Err.Number & "|" & Err.Description)
End If
End Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you guys for the idea you have provided in the issue. I was able to run thru configuring the Sql server configuration manager. Thanks you both and may God bless you!
ASKER