Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dsn-less connection issue in dreamweaver

Status
Not open for further replies.

thesimpsonator

IS-IT--Management
Jul 5, 2007
24
0
0
GB
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top