ODBC error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: ODBC error

  1. #1
    Join Date
    Feb 2006
    Posts
    1

    ODBC error

    I am trying to access a MS Access database which is on a remote server and with my DSN less connection I get the following error , can you please tell me what could be the reason behind.

    My code is
    %@LANGUAGE="VBSCRIPT"%>
    <!--#INCLUDE virtual="/common/pricelist.asp"-->
    <%
    Dim ConnectionString
    dim oConn

    ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" &_
    "DBQ=\\Server167\BusOps\Maint_ Ren_ Web_ Page_ Upload_DB.mdb;DefaultDir=;UID=;PWD=;"


    Dim objRS
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.Open "Select * from [Maintenance Report] where country = 'AD'", ConnectionString

    %>


    and the error that I get is

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data.

    /Renewals/testfeb.asp, line 13
    Last edited by madhuri.t; 02-01-2006 at 11:02 AM.

  2. #2
    Join Date
    Dec 2003
    Location
    San Diego
    Posts
    202
    One common issue in dealing with Access is that if a user opens the database via the Access GUI, it is locked and you cannot open a connection to it via ASP.

    If you have it open for development, you need to close Access before testing your ASP page. If other users have access to it, you should place it in a restrcited directory that only your ASP has rights too.

    If this is not your issue, please provide more info about your application environment and how Access is being used or is setup.

    Good luck,
    Michael Sanchez
    Managing Technical Editor
    Forum Moderator
    FreeVBCode.com

Similar Threads

  1. 'On Error Goto' versus 'Try, Catch, Fail'
    By clarence_rollins in forum .NET
    Replies: 21
    Last Post: 09-11-2002, 11:32 AM
  2. ODBC driver error
    By og in forum VB Classic
    Replies: 0
    Last Post: 04-04-2002, 03:43 PM
  3. DTS/linked server error #6
    By John M. in forum Database
    Replies: 0
    Last Post: 05-17-2001, 03:01 PM
  4. Replies: 0
    Last Post: 06-12-2000, 04:09 PM
  5. ODBC Drivers error '80040e14'
    By Roberto Marques in forum ASP.NET
    Replies: 7
    Last Post: 06-08-2000, 03:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center