Connecting to Access database in Dreamweaver using GoDaddy

Posted on 2008-11-07
Last Modified: 2012-05-05
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

Question by:knoxDerek

    Accepted Solution

    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!
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    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!


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now