Solved

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

Posted on 2010-09-08
6
619 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
  • 3
  • 2
6 Comments
 
LVL 82

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 82

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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 82

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

14 Experts available now in Live!

Get 1:1 Help Now