Solved

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

Posted on 2010-09-08
6
623 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
two-way Authentication ASP 3 79
Can not run ASP pages Windows 10 Edge browser. 5 73
If-Then-Else ASP problem 6 46
IP API - need data... 4 8
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

947 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

22 Experts available now in Live!

Get 1:1 Help Now