Question
DSN - Puzzling
Not sure if it is me or them. I have a number of DSN's set up
pointing at different Windows servers all over the world. I have
recently set up a new DSN with a new server who says that the
connection string that dreamweaver creates is wrong. I can connect
locally, I have checked numerous times that the naming is the same
and tried with and without the UID and password. I keep getting the
same response.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/register_test.asp, line 113
Here is the string:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_gwl_STRING
MM_gwl_STRING = "dsn=access_gwl;uid=hidden;pwd=hidden;"
%>
On their site they talk about file DSN's. Here are the instructions:
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_path
Dim db_dir
db_dir = Server.MapPath("access_db")
db_path = db_dir & "\yourdatabasefile.mdb"
fieldname = "your_field"
tablename = "your_table"
connectstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & db_path
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & "
"
oRS.movenext
wend
oRS.close
end if
Set oRs = nothing
Set oConn = nothing
%>
As a novice I do not understand why a local connection that works fails on the server when whatever I have done elsewhere works right away.
Thank you fto anyone responding
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/register_test.asp, line 113
Here is the string:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_gwl_STRING
MM_gwl_STRING = "dsn=access_gwl;uid=hidden;pwd=hidden;"
%>
On their site they talk about file DSN's. Here are the instructions:
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_path
Dim db_dir
db_dir = Server.MapPath("access_db")
db_path = db_dir & "\yourdatabasefile.mdb"
fieldname = "your_field"
tablename = "your_table"
connectstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & db_path
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & "
"
oRS.movenext
wend
oRS.close
end if
Set oRs = nothing
Set oConn = nothing
%>
As a novice I do not understand why a local connection that works fails on the server when whatever I have done elsewhere works right away.
Thank you fto anyone responding
