Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    4

    Unanswered: VB6 exe file running problem in PC that not installed VB6

    Below is my problem:

    I compiled VB6 project to be exe file then install in other PC(havnt VB6).
    When open exe file, it say need MSADODC.OCX, so, i have save "MSADODC.ocx" inside the window system to run.

    The major problem is that I use ADODC(link with data environment of VB6) to control my database, so when i do some operations like add, save...etc
    it will prompt a message box and force my program end.

    the msg box said:
    Run-Time error '91':
    Object variable or With block variable not set.

    Can you help me to solve it?
    Thankx

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    Does your executable work correctly on your machine? That error usually occurs when you try to access an object before having initilized it.

    i.e.

    If you write

    ADOConnection.Open

    Before having writing this

    Set ADOConnection = New ADODB.Connection

    You will get the Object variable or With block variable not set error.

    Furthermore create a setup package using the Package & Deployment Wizard that comes with your Visual Studio Tools and then install the package on the machine without VB, there are certain runtime files that your executable may need and this gets them and installs them with the package.
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Jun 2004
    Posts
    4
    Thank you, i have solve this problem with Package & Develop Wizards

Posting Permissions

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