Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Run-time error '91':

Run-time error '91':

Scheduled Pinned Locked Moved Visual Basic
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    asierra
    wrote on last edited by
    #1

    Hello, I am a getting this error when trying to run my app on a PC that doesn't have VB6 installed. I have a form with an adodc connecting to a DSN, and some controls bind to it. When trying to do some action, like addnew EOF, I get this error: Run-time Error '91': Object Variable or Block Variable Not set First I thought about my dependecy files, which I believe no one is missing in my VSInstaller project. I downloaded the runtime VB6 files from microsoft, and de ado runtime files ans the mdac_type.exe all installed on the target PC. But nothing of this seems to work. I've installed it on two other PC's with vb6 installed and it runs fine. Any ideas, of what could be happening here? -Alfred

    D 1 Reply Last reply
    0
    • A asierra

      Hello, I am a getting this error when trying to run my app on a PC that doesn't have VB6 installed. I have a form with an adodc connecting to a DSN, and some controls bind to it. When trying to do some action, like addnew EOF, I get this error: Run-time Error '91': Object Variable or Block Variable Not set First I thought about my dependecy files, which I believe no one is missing in my VSInstaller project. I downloaded the runtime VB6 files from microsoft, and de ado runtime files ans the mdac_type.exe all installed on the target PC. But nothing of this seems to work. I've installed it on two other PC's with vb6 installed and it runs fine. Any ideas, of what could be happening here? -Alfred

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It sounds like you have code that is not handling an error correctly or at all. You are probably assuming in one line of code that is, say, returning a dataset sucessfully, but in actualality it generates an error or returns a Nothing object reference, then your trying to use that reference. An example of this would be:

      Dim objRecordSet as RecordSet
      objRecordSet.Next

      This would generate the error your talking about because objRecordSet doesn't actually point to a RecordSet object. RageInTheMachine9532

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It sounds like you have code that is not handling an error correctly or at all. You are probably assuming in one line of code that is, say, returning a dataset sucessfully, but in actualality it generates an error or returns a Nothing object reference, then your trying to use that reference. An example of this would be:

        Dim objRecordSet as RecordSet
        objRecordSet.Next

        This would generate the error your talking about because objRecordSet doesn't actually point to a RecordSet object. RageInTheMachine9532

        A Offline
        A Offline
        asierra
        wrote on last edited by
        #3

        Well, you are right, and I just found out that the problem is that my recordset is not been opened. and that was giving me that error. As I said, When I run this app on any PC that had VB6.0 previously installed, it runs fine, but when I run it on a new PC it doesn´t open my recordset. It seems that some dll is missing on the target PC. I am using an adodc data control connecting through ODBC to an access database. Do you know which other should be included when distributing?

        D 1 Reply Last reply
        0
        • A asierra

          Well, you are right, and I just found out that the problem is that my recordset is not been opened. and that was giving me that error. As I said, When I run this app on any PC that had VB6.0 previously installed, it runs fine, but when I run it on a new PC it doesn´t open my recordset. It seems that some dll is missing on the target PC. I am using an adodc data control connecting through ODBC to an access database. Do you know which other should be included when distributing?

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          You could probably take the shotgun approach to killing the problem(s) by installing the latest MDAC from Microsoft. You can find that here[^]. RageInTheMachine9532

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups