Wrox Programmer Forums
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 21st, 2003, 09:01 AM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to PhillipMorris
Default Help needed please please

I am trying to build a project that has access to a database stored in a web server. I uploaded my database in a free hosting site like websamba and i don't know how to access it from my app. I am sure that it could be done using asp code but i am getting mixed up with DSN or DSNless asp code.
Can someone help me please. I am desperate...


 
Old August 21st, 2003, 09:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I just had a look at websamba and I see they offer "Free ODBC System DSN Setup". So it would seem the easiest way for you is to get a system DSN set up and use that to connect to your db like this:
Code:
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=whateverNameItUses"
...
hth
Phil
 
Old September 10th, 2003, 01:00 AM
Registered User
 
Join Date: Aug 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to PhillipMorris
Default

Well, the problem is that I cannot use the DSN setup. The websites don't allow that option...

Thanks anyway...

 
Old September 10th, 2003, 03:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well then you'll have to use DSN-less connection. You need to find out the relative path from your asp page to the database and build your connection string accordingly. You don't say what rdbms it is (Edited - oops just realised this is the Access forum so use the Jet OLEDB driver examples in that link page), but there are examples of them all here: http://www.able-consulting.com/ADO_Conn.htm
 
Old September 23rd, 2003, 11:39 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maybe this can help. Let me know if it does okay or at least comes close.

conn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=path\whatever.mdb"
OR better yet
conn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../whatever.mdb")

Then set and open your recordset...

set rs = server.createobject("adodb.recordset")
sql = "select * from table"
rs.open sql, conn, 3, 3


NOTE: 3, 3 is write mode for Access I think.









Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed ramabharti Javascript How-To 1 December 7th, 2006 06:42 AM
Help needed rrvinod ADO.NET 0 October 5th, 2006 09:44 AM
help needed! paquito Beginning PHP 2 November 16th, 2005 11:51 AM
A Little help needed matthew01 ASP.NET 1.0 and 1.1 Basics 3 November 9th, 2005 11:29 AM
help needed kfarooq Java Databases 1 June 27th, 2003 05:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.