Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-08
6
Medium Priority
?
667 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 84

Accepted Solution

by:
Dave Baldwin earned 1000 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 84

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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 84

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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