thesimpsonator
IS-IT--Management
Hi folks,
fairly new to this dsn-less stuff and can't get it to work!
got connection string from hosting company, and ammended to include my details, ie userid, database name, server name etc. .. However i keep getting syntax error when i try to access the pages using the connection.
the code i have is:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={SQL
Server};SERVER=mssql.domain.com;UID=USER;PWD=password;DATABASE=mydatabase"
Conn.open DSNtest
%>
i substituted dsntest for the name i wanted to call connection, updated my server name, user id, password and database name.
created connection in dreamweaver (using DW8) assume i did it correctly by using the custom connection string?
input the string into the appropriate box and doesn't work
error i got on page load is:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/Connections/DSNtest.asp, line 9
MM_DSNtest_STRING = <% Set Conn = Server.CreateObject("ADODB.Connection") DSNtest="DRIVER={SQLServer};SERVER=mssql.domain.com;UID=USER;PWD=password;DATABASE=mydatabase" Conn.open DSNtest
--------------------^
in DW when you look at the file that is created for the connection, for it to pick up correctly in the custom string field the entire string needs to be on the one line, the highlighting of the code doesn't seem to be correct, or am i doing something totally wrong when trying to connect to the database?
any help is greatly appreciated.
fairly new to this dsn-less stuff and can't get it to work!
got connection string from hosting company, and ammended to include my details, ie userid, database name, server name etc. .. However i keep getting syntax error when i try to access the pages using the connection.
the code i have is:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={SQL
Server};SERVER=mssql.domain.com;UID=USER;PWD=password;DATABASE=mydatabase"
Conn.open DSNtest
%>
i substituted dsntest for the name i wanted to call connection, updated my server name, user id, password and database name.
created connection in dreamweaver (using DW8) assume i did it correctly by using the custom connection string?
input the string into the appropriate box and doesn't work
error i got on page load is:
Microsoft VBScript compilation error '800a03ea'
Syntax error
/Connections/DSNtest.asp, line 9
MM_DSNtest_STRING = <% Set Conn = Server.CreateObject("ADODB.Connection") DSNtest="DRIVER={SQLServer};SERVER=mssql.domain.com;UID=USER;PWD=password;DATABASE=mydatabase" Conn.open DSNtest
--------------------^
in DW when you look at the file that is created for the connection, for it to pick up correctly in the custom string field the entire string needs to be on the one line, the highlighting of the code doesn't seem to be correct, or am i doing something totally wrong when trying to connect to the database?
any help is greatly appreciated.