Can anyone provide a generic connection to SQL Server 2000 via ASP
I am in the process of upsizing to SQL Server and need to learn the new conneciton string vs what I use now for MS Access
Here is my current connection in MS Access:
<% Set objConnST = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("../Database/AmigosHCTracker_TEST.mdb; Password=password")
objConnST.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
strsqST = "SELECT * FROM tbl_Location where State = 'MD' Order By State, CourseName"
Set objRSST = objConnST.Execute(strsqST) %>
Here is what I have so far that is bombing out:
<%
Set objConn4 = Server.CreateObject("ADODB.Connection")
objConn4.open "DSN=sql.93524;UID=golfinamigos;PWD=password;DATAB ASE=amigosSQL"
strsqST = "SELECT * FROM tbl_Location where State = 'MD' Order By State, CourseName"
Set objRSST = objConnST.Execute(strsqST) %>
This is the error:
Microsoft VBScript runtime error '800a01a8'
Object required: 'objConnST'
/AreaCourses/Test_DSN.asp, line 5
Any help would be most appreciated!