- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi
Im using dreamweaver and my host is goddady
How I connect an Access Database Using File DSN and ASP/ADO?
Goddady help file said:
The purpose of the Windows file DSN (data source name) is to centrally store your database connection information. If you have many Web pages that require database access, this feature enables you to simply reference the path of the file DSN instead of having to provide the database connection details on every page.
For security reasons, the file DSN is kept in a sub-directory of your hosting content directory that cannot be viewed by anonymous Web users. The file DSN works with ASP and uses ADO to access a database. This directory is named "_dsn" and you can find it at the root of your hosting account.
http://help.godaddy.com/ar
I have a database with two tables ( the name is listados.mdb and the tables are usuarios and propiedades)
The help center of goddady the following asp script but I need your help.
1.What i need to change in this script?
2.I need to put this script exactly in a asp page?
3. What more I need to do? Can you expline to me More Specific?
<%
Dim oConn, oRs
Dim qry, connectstr, sDSNDir
Dim db_name, db_username, db_userpassword
Dim db_server, dsn_name
dsn_name = "your_dsn_name"
fieldname = "your_fieldname"
tablename = "your_tablename"
sDSNDir = Server.MapPath("_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
Set oConn = Server.CreateObject("ADODB
oConn.Open connectstr
qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & " "
oRS.movenext
wend
oRS.close
end if
Set oRs = nothing
Set oConn = nothing
%>
Thank for all your help !!!!!!!
Thank You
Alfonso
This question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership