Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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, 11:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I usually hard code the page. I am not saying it is the best thing but that is what I do and it works. I'd say use the OLEDB connect string and just hard code the path like so:
Code:
<% strConnect = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\databases\sbdc.mdb;Persist Security Info=False %>
You will need to set the path to where you have the actual DB and it is the path on the server (physical), not the web path.


Chris
 
Old August 22nd, 2003, 03:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

AHhhh.. i finally figured it out. I used this connection string on a server that processes ASP pages and it finally worked.

strConnect="DBQ=" & Server.Mappath("scservices.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
I'm glad you got something to work, but as I said before do not use this ODBC driver - it sucks for ASP

Thanks guys.

1. Okay let me get this straight... When i do my site locally I use this: <
% strConnect = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\sbdc.mdb;Persist Security Info=False %>
Yep thats good.

2. And when my database is on a hosting server the string should be this:
strConnect="DBQ=" & Server.Mappath("scservices.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
No that's bad - wrong driver, use
<% strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("scservices.mdb") & ";Persist Security Info=False" %>

3. So whats this for????
'strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=database/list.mdb"
forget this one - that driver sucks :)

4. I can also connect using a DSN right, but i need the admin to set that up for me?
Yep, the you would use <% strConnect = "DSN=whateverTheNameIs" %>

hth
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Many-to-Many Relationships in O/R Mapping sarosh Classic ASP Databases 0 December 8th, 2006 05:45 AM
Problems with mapping mauriciom Biztalk 2 August 16th, 2006 06:47 AM
Character Mapping muki XSLT 2 November 11th, 2005 03:11 AM
O/R mapping s_sana General .NET 0 April 12th, 2005 06:34 AM
Mapping SID Anantsharma SQL Server 2000 2 February 10th, 2005 05:32 AM





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