Godaddy Connecting to an Access Database Using ASP/ADO
I've set up a very simple one page website for a customer. He moved it to godaddy.com after it has been working fine on another server.
Godaddy's connection string is different, and I don't understand a few of the things it is asking.
I'm using an access database with the following tables:
AboutUs
WhatWeDo
ContactUs
Sidebar
Each table has 1 field called: Content
Here is the godaddy string they want me to use (I assume in my asp connection file):
<%
Dim oConn, oRs
Dim qry, connectstr
Dim db_path
Dim db_dir
db_dir = Server.MapPath("access_db") & "\"
db_path = db_dir & "db1.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
%>
I've uploaded the database to the access_db folder...but I don't know what they want me to put in the "fieldname" and "tablename"?
And there is no place for the username and password.
Their tech support doesn't support this kind of help, so any help would be appreciated.
Thanks