|
|
 |
| 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.
|
 |

February 7th, 2007, 11:14 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

February 7th, 2007, 11:19 AM
|
|
Wrox Author
Points: 12,827, Level: 49 |
|
|
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
|
|
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^^
================================================== =========
|

February 7th, 2007, 11:40 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

February 7th, 2007, 11:49 AM
|
|
Registered User
|
|
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry all.
The reason for this next error was stupidity on my part. Slightly wrong connection string.
Thanks for the help.
Glenn
|

February 7th, 2007, 12:02 PM
|
|
Wrox Author
Points: 12,827, Level: 49 |
|
|
Join Date: Oct 2005
Location: Akron, Ohio, USA.
Posts: 4,029
Thanks: 1
Thanked 42 Times in 42 Posts
|
|
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^^
================================================== =========
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
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 |
|
 |