Solved

Connecting to an Access Database Using File DSN and ASP/ADO within godaddy.com

Posted on 2010-09-08
6
655 Views
Last Modified: 2012-05-10
godaddy.com tells us to use:
http://help.godaddy.com/article/259

There must be an easier way than to place this on each page? If not, can you decipher the code from godaddy's help site? Can't the typical Connections file that Dreamweaver creates be modified to interface with the DSN that godaddy creates? Do I need to create a custom connection string? If so, what would that look like? Does anyone know a working connection string or vbscript that will work?. Also need to know how to modify Permissions on the "access_db" folder that is created inside godaddy. It contains my .mdb file and is always grayed out so I can't modify permissions.


<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_mydsn_STRING
MM_mydsn_STRING = "dsn=dsn_name_from_godaddy;uid=userid;pwd=password;"

Open in new window

0
Comment
Question by:netsmithcentral
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 33634152
No, you won't be able to change Godaddy's methods.  Already done that, been there.  The code on that page works.  You have to get the 'dsn' from the Database  page on the Hosting Control Panel.

Only the admins can change permissions on a Windows server, there is no provision to change them remotely.  MDBs on other Windows hosting are handled the same way in my experience.  No direct access, only thru local file DSN.  They do that because the entire database can be downloaded if you put it in a web accessible directory.
0
 
LVL 12

Author Comment

by:netsmithcentral
ID: 33643845
Can you or someone paste some code of a working sample using these methods? swapping out any confidential info with generic words....
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33644064
Here's the connection part from my ASP/Access page on Godaddy.  The sample code in http://help.godaddy.com/article/259 does work if you put in your own information.  That's what I used to create my own page.  I attached a screen shot of it with a couple of details whited out.
<h2>ASP/Access MDB</h2>
<%
Dim oConn, oRs
Dim connectstr, sDSNDir
Dim dsn_name
Dim db_server

dsn_name = "xxxxxxxx.dsn"

'assumes that _dsn exists in the root
sDSNDir = Server.MapPath("\_dsn")

connectstr = "filedsn=" & sDSNDir & "\" & dsn_name

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
%>

Open in new window

GD-Access.jpg
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Author Comment

by:netsmithcentral
ID: 33650764
this is what worked, I needed to correct the Hosting Path which they instructed me on finding. I knew it was something easy but of course they don't help much.

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_myDSN_STRING
MM_myDSN_STRING = "Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Hosting\9999999\html\access_db\DBfile.mdb"
%>
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 33650840
Good, glad you got it to work.  And thanks for the points.
0
 

Expert Comment

by:dsr-websitech
ID: 34222818
I need a way to replicate the same database connection scenario, between godaddy hosting and my local webserver.so that I can develp with dreamweaver and upload the changes easily.

I know there is a away, if anyone can put this information together , please help.

Can i replicate the path to the database in Godaddy, and make it the same locally.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

617 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