<%'On Error Resume Next
Set objConn = Nothing
Dim strConnect
strConnect = "Provider=sqloledb;Library=DBMSSOCN;Data Source=xx.xx.xx.xx;1433"
"Initial Catalog=mydatabasename;"
"User Id=userID;Password=password;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open strConnect
I’m coding in Dreamweaver for my website. But somehow it doesnt link to the database.
My database in Microsoft SQL server 2008 R2. I’ve tried all the strings as stated in http://www.connectionstrings.com/sql-server-2008. But doesnt seem to link.
Anything wrong im doing here? Sorry about the bad alignment, im still getting used to stackoverflow’s alignment methods
If what you’ve posted is your actual connection string, it’s malformed. You have a
;instead of:before the port number, and no;after it.This should be
When in doubt, write out the connection string and look at what you’re actually using in opening the connection.