Accessing Database through DLL Problem

Results 1 to 2 of 2

Thread: Accessing Database through DLL Problem

  1. #1
    Daniel Myburgh Guest

    Default Accessing Database through DLL Problem

    Hi <BR>I’ve got a ASP application that connects to an Access database and displays three fields from the Employee table. This works fine and I now want to do the same by using a DLL for the database connection and Recordset retrieval.<BR><BR>I’m using the same code in the DLL to connect to the server plus I’ve tested the component in normal form based VB Application where it works fine. When I use it in the ASP page though I get an Error.<BR>Here is the ASP code.<BR><BR>&#060;%<BR>Option Explicit<BR>Dim MyObject<BR>Set MyObject = Server.CreateObject(SampleServer.Employee)<BR>Resp onse.write MyObject.EmpInfo<BR>%&#062;<BR><BR>The problem is not with the connecting to DLL object because if I create a DLL that returns a String without any Database connections/retrievals then it works fine. So It seems like everything points to the Database connection inside the DLL but I’ve got no idea what the problem can be.<BR><BR>Here is the Error message from the ASP page.<BR>Microsoft OLE DB Provider for ODBC Drivers error 8004005[Microsoft][ODBC Access 97 ODBC driver Driver] General error Unable to open registry key ‘DriverId’<BR><BR>Well I hope this is not as clear as mud !<BR>And thanks for the help<BR><BR>Daniel<BR><BR>Ps. Boy do I hate being a newbie !<BR>

  2. #2
    Chrace Guest

    Default RE: Accessing Database through DLL Problem

    Just to say something (it might not be right):<BR>You application is looking for a "DriverId" in the windows system registry.<BR>Now, assuming I understand it right, you have tested the code dorectly in a VB application. But, as you are trying to use it now, it is as an ActiveX component - and I think the problem is that this ActiveX component you have developed is not registered correctly. Bear in mind that even if Microsoft calls it by the name "ActiveX", there&#039s a big difference between OLE, dll and the ActiveX we ASP developers know of. I have had dire problems with this in the past.<BR><BR>Be sure that the application you have created in VB is created as an "ActiveX project" - there is a special type for these. Don&#039t just use "dll".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts