Hi, I am having problem getting path to work. Hosted site is on GoDaddy if this helps. I am a CF Guy so DSn is new to me as you know ColdFusion Administrator takes care of DSN for CF scripts.
GoDaddy uses DSN *File* I need to set the path. I understand what i am supossed to do, just can't get it to work.
<--Here is the error msg -->
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn ''
/menu.asp, line 15
<--end of error message-->
The scripts that I have been using to connect to databases didn't work on the GoDaddy Server. I tried to get the path to work, just counldn't figure it out. So I used ths script that they provide. and made the correct chages to it- still can't get it to work.
The DSN file is in a directory named: access_db/ that is located at the root. The DSN File name is: mainbar.mdb
Here is the page that I am using.. Can anyone see what I am doing that needs to be changed/fixed..?
<--begining of page-->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim oConn, oRs, fieldname, tablename
Dim qry, connectstr, sDSNDir
Dim db_server, dsn_name
dsn_name = "access_mainbar.dsn"
fieldname = "MItem"
tablename = "Menu"
sDSNDir = Server.MapPath("access_db/mainbar.mdb")
connectstr = "filedsn="
connectstr = connectstr & sDSNDir
connectstr = connectstr & "\"
connectstr = connectstr & dsn_name
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM Menu"
Set oRS = oConn.Execute(qry)
%>
<html><body>
<%
while not oRS.EOF
response.write oRs.Fields(fieldname)
oRS.movenext
wend
oRS.close
Set oRs = nothing
Set oConn = nothing
%>
</body></html>
<--end of page-->
Any help would be appriciated
Thanks,
