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 March 31st, 2004, 11:37 PM
Authorized User
 
Join Date: Jan 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error

Can someone please help me figure out why I get this code???

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 0x1aec Thread 0x1e38 DBC 0x157b024 Jet'.

/mercysch/temp/managementarea/Admin/Adminconnect.asp, line 6

is the error I get. On that adminconnect.asp, here is the code:

<!-- METADATA TYPE="typelib"
              FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
Dim objConn
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../temp/database/mercy.mdb")
  If Session("blnValidUser") = True and Session("AdminID") = "" Then
    Dim rsAdminIDCheck
    Set rsAdminIDCheck = Server.CreateObject("ADODB.Recordset")
    Dim strSQL
    strSQL = "SELECT AdminID FROM tblAdmin " & _
             "WHERE Username = '" & Session("Username") & "';"
    rsAdminIDCheck.Open strSQL, objConn
    If rsAdminIDCheck.EOF Then
      Session("blnValidUser") = False
    Else
      Session("AdminID") = rsAdminIDCheck("AdminID")
    End If
    rsAdminIDCheck.Close
    Set rsAdminIDCheck = Nothing
  End If
%>


 
Old April 1st, 2004, 03:06 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Stacy,

Try upgrading the connection string you're using. You're using an "old skool" driver that is no longer recommended. Try this instead:
Code:
Dim ConnectionString
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
   "Data Source=" & Server.MapPath("../temp/database/mercy.mdb") &  _ 
   "User Id=admin;" & _
   "Password="
objConn.Open ConnectionString
Do you still get the same error?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old April 8th, 2004, 09:55 PM
Authorized User
 
Join Date: Jan 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What do i put if there are alot of different usernames?

 
Old April 9th, 2004, 01:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not sure what you mean by that. What user names are you referring to?

If you have stored your users in an ordinary table, there is no need to use specific user names to connect to the database. You can use the Admin account as in my example.

Are you talking about application users (your users) or user accounts as defined in the Access UI?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Eurochild by Massive Attack (Track 7 from the album: Protection)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





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