CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2001
    Posts
    7

    ADO and OLEDB provider

    I have developed a application by Visual C++ 6.0, in which I have use ADO and
    OLE provider to access a database(For example:temp.mdb),some codes as following:

    ...
    _ConnectionPtr pCon;
    CString strcnn("Provider=Microsoft.Jet.OleDB.4.0;Data Source=temp.mdb");
    pCon->Open(strcnn,"","",NULL);
    ...

    When I do debuging, Application can access Database well, but When I want to
    deploy application , I try to intall on Windows 98, While I start application from Start/Program/xxx
    application failed to access database (temp.mdb), What can I do?
    All suggestion will be welcome, thanks.


  2. #2
    Join Date
    Jun 1999
    Posts
    5

    Re: ADO and OLEDB provider

    You have hard coded the location of the database in your connection string. Have you ensured that the machine on which you are installing the program has the same direct path?
    If it is different machine then the location of the database will different (Different path). When you debug the program, you would be using your machine, and so can locate the database.
    Check the path you have specified.

    Hope this helps.
    Thanks.



  3. #3
    Join Date
    Jul 2000
    Location
    Pakistan
    Posts
    9

    Re: ADO and OLEDB provider

    make sure u give complete path to database in the connection string. moreover the path must be registry based i.e where the user installs the application.
    Regards


  4. #4
    Join Date
    May 2001
    Posts
    7

    Re: ADO and OLEDB provider



    I have solved this problem. thanks for your help!!!


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured