[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Connecting to Access database in Dreamweaver using GoDaddy

Posted on 2008-11-07
2
Medium Priority
?
2,639 Views
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:  http://help.godaddy.com/article/257

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; "
"
oRS.movenext
wend
oRS.close
end if
 
Set oRs = nothing
Set oConn = nothing
 
%>

Open in new window

0
Comment
Question by:knoxDerek
2 Comments
 

Accepted Solution

by:
knoxDerek earned 0 total points
ID: 22914695
I found the answer on another post here on EE. It is the accepted answer from "CoastalData" on the following page: http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_21978156.html

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

Expert Comment

by:Jeffrey Coachman
ID: 22919293
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!
;-)

JeffCoachman
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

834 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