Connecting to Access database in Dreamweaver using GoDaddy

I use Dreamweaver CS3. I have an Access database. I have a GoDaddy shared hoting account. I have set up a DSN through GoDaddy. I have tried to use their code for connecting to an ACCESS database. This can be forund here:

my DSN created throgh GoDaddy is named: access_composeyours.dsn
- the DSN has a username and password assigned

the connection file in dreamweaver is named: access_composeyours.asp (I figured I was suppose to name it the same as my DSN??)

the microsoft access database name is: composeyours.mdb
- this database is located inside the "access_db" folder on GoDaddy

I'm not a programmer, and therefore I am unsure what or where to change out their words in this code for my information. I have attempted to the best of my knowledge, and I can view the database information on my local machine within Dreamweaver. So, I can create a recordset,etc. But, when I try to view just a simple asp page I created a recordset on using the connection, I get the following error msg in my browser:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/Connections/access_composeyours.asp, line 2

Dim oConn, oRs

Now, just to try and give you as much info as possibe:

I have set up my testing server to be the same as my remote host (my website at GoDaddy) and I have the server model set to "ASPJAVASCRIPT".

I have researched all over the web and found examples of DSN-Less connection scripts, etc and I have managed to get the same result of being able to see the information locally (like it makes the connection) but fails when I try to load a page using a recordset referencing the DSN.
here is my dsn connection file code tring to use GoDaddy's example:
Dim oConn, oRs
Dim qry, connectstr
Dim db_path
Dim db_dir
db_dir = Server.MapPath("access_db") &amp; "\"
db_path = db_dir &amp; "composeyours.mdb"
fieldname = "firstname"
tablename = "Customers"
connectstr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &amp; db_path
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " &amp; tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) &amp; ": " &amp; oRs.Fields(fieldname) &amp; "
end if
Set oRs = nothing
Set oConn = nothing

Open in new window

Who is Participating?
knoxDerekConnect With a Mentor Author Commented:
I found the answer on another post here on EE. It is the accepted answer from "CoastalData" on the following page:

The key was to first have my testing server set to VBSScript.
Next was that I followed the instructions and used the code on CoastalData's post in a "Custom connection string.

That's it!
Jeffrey CoachmanMIS LiasonCommented:
Great, Congratulations!

I was going to suggest that you call GoDaddy directly.
They have great support.

The good news is that here, you can actually accept your own post as the solution!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.