Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Data From Access via DSN

Status
Not open for further replies.

rpbenito

Programmer
Jun 13, 2001
63
US
ok...here's my problem...I rented web space from a server and I am trying to make a DHTML document to retrieve data from ACCESS. I am having trouble getting it to work....here is my code...

Private Function Connect_onclick() As Boolean
Dim conn As ADODB.Connection
Dim conn_string As String
Set conn = New Connection
conn_string = "Provider=Microsoft.Jet.OLEDB.3.51;DSN=Pat;Database=biblio.mdb"
conn.Open
conn.Close
End Function

I have created a DSN on my local machine called Pat to test it...it doesn't work on my local machine.(I wanted to test it on my machine before creating the dsn on the server) Can someone help me out as to what I am doing wrong? Thank you so much.
 
Just use:

conn_string ="DSN=Pat"

The DSN already stores the required information to make your connection.

Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top