» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2006, 11:10 AM
kinsley kinsley is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kinsley is on a distinguished road
Default ASP and MS access database

I currently have a Ms Access database stored at
c:\database\db.mdb

How do I use ASP to connect to the database?

I would like to know how to access the database with and without using odbc
Any ideas are welcomed
Thanks -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-19-2006, 11:12 AM
cameroon cameroon is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
cameroon is on a distinguished road
Default

With ODBC
- Open ODBC data source administrator, which is within control panel->administrative tools on win2k, or c:\winnt\system32

Without ODBC
- Use server.mappath, or a physical string

Like this.
PHP Code:
dim path
dim provider

path = "C:\blah\blah.mdb"
'path = "" & Server.MapPath("../database.mdb") & ""
provider = "Microsoft.Jet.OLEdb.4.0"

dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.provider = provider
objConn.ConnectionString = path
objConn.Open

Hope taht helps -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 02:24 AM.