Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: SQL Server 2008 DB Connection
04-13-2012, 02:57 AM #1
- Join Date
- Aug 2011
- Thanked 0 Times in 0 Posts
SQL Server 2008 DB Connection
I am trying to connect to a SQL Server database, not hosted on the web. I have tried multiple variations of the connection string below, but all have failed. Unfortunately I simply get an "Internal Server" error. Please help!
objOrdersConn.Open "Provider=sqloledb; Data Source=<ipaddress>,1433;network library=DBMSSOCN;Initial Catalog=SPI; User ID=<uid>; Password=<pw>"
I am assuming the Initial Catalog is the name of the actual database (the SQL Server has numerous databases).
I am able to ping the SQL Server over port 1433 so I do not believe it is the server denying the opening of the connection.
04-13-2012, 06:47 AM #2
... On Error Resume Next objOrdersConn.Open "Provider=sqloledb; ... etc. ... " If Err.Number > 0 Then Response.Write "Error #" & Err.Number & ": " & Err.Description & "<HR>" End If For e = 0 To objOrdersConn.Errors.Count-1 Set oops = objOrdersConn.Errors(e) Response.Write "Connection error #" & oops.Number & ": " & oops.Description & "<HR>" Next On Error GoTo 0 ... %>
It *might* need to beCode:
For e = 1 To objOrdersConn.Errors.CountBe yourself. No one else is as qualified.