Solved

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

Posted on 2010-09-08
6
631 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 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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