Run-time error '91':
-
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
-
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
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.NextThis would generate the error your talking about because objRecordSet doesn't actually point to a RecordSet object. RageInTheMachine9532
-
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.NextThis would generate the error your talking about because objRecordSet doesn't actually point to a RecordSet object. RageInTheMachine9532
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?
-
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?