p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 7th, 2007, 11:14 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing from DNS to DNS less connection

Hi,
I'm moving to hosting that doesn't allow DNS connections, as my site has been set up and need therefore to move to a DNS less connection to a MS Access DB.
I'm getting an error reading:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x80c Thread 0x8c0 DBC 0xec826f4 Jet'.

/showcategory.asp, line 15

The code around this point is:

Code:
Dim rs_Categories
Dim rs_Categories_numRows

Set rs_Categories = Server.CreateObject("ADODB.Recordset")
rs_Categories.ActiveConnection = MM_db_port_STRING
rs_Categories.Source = "SELECT * FROM tbl_Category WHERE CatID = " + Replace(rs_Categories__MMColParam, "'", "''") + ""
rs_Categories.CursorType = 0
rs_Categories.CursorLocation = 2
rs_Categories.LockType = 1
rs_Categories.Open()

rs_Categories_numRows = 0
as created by Dreamweaver... All I've done to try and get around swapping this over is change the file in the Connections file from:
Code:
MM_db_port_STRING = "dsn=databasedsn;"
to:
Code:
Dim MM_db_port_STRING
conString = "DBQ=D:pathtodatabase\databasename.mdb"
MM_db_port_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};" & conString
Any help would be greatly appreciated. I've also tried using Provider= and Data Source instead of the DRIVER= and DBQ but to no avail. Do I need to change the whole Connection part of the code?

Thanks in advance,

Glenn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old February 7th, 2007, 11:19 AM
Wrox Author
Points: 12,827, Level: 49
Points: 12,827, Level: 49 Points: 12,827, Level: 49 Points: 12,827, Level: 49
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
Send a message via AIM to dparsons
Default

Try: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;

And, as a matter of personal prefreance, i suppose, i never hard coded the path to the mdb file.

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &Server.MapPath("mydatabase.mdb") &";"

You can also refer to http://www.connectionstrings.com

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old February 7th, 2007, 11:40 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for that, seems to be seeing the database now, although I'm now getting the interesting error of:

Microsoft JET Database Engine error '80004005'

The Microsoft Jet database engine cannot open the file 'D:\database.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

/showcategory.asp, line 15

Any more thoughts?

Thanks,

Glenn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old February 7th, 2007, 11:49 AM
Registered User
Points: 20, Level: 1
Points: 20, Level: 1 Points: 20, Level: 1 Points: 20, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry all.
The reason for this next error was stupidity on my part. Slightly wrong connection string.

Thanks for the help.

Glenn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old February 7th, 2007, 12:02 PM
Wrox Author
Points: 12,827, Level: 49
Points: 12,827, Level: 49 Points: 12,827, Level: 49 Points: 12,827, Level: 49
Activity: 15%
Activity: 15% Activity: 15% Activity: 15%
 
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
Send a message via AIM to dparsons
Default

Glad you got it all worked out.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
secondary DNS vs. second primary DNS gangu1971 Linux 1 March 1st, 2005 10:40 AM
dns ghari Classic ASP Professional 3 October 27th, 2004 03:12 AM
DNS-less ODBC php Morrislgn Beginning PHP 0 September 9th, 2004 03:59 AM
DNS kilika Classic ASP Professional 5 August 4th, 2004 01:53 PM
DNS Configuration anibiswas Linux 1 December 10th, 2003 01:13 PM



All times are GMT -4. The time now is 11:19 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc