Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘run time error’

PRB: Setting ADO Recordset Cachesize with JET OLEDB Provider Returns Error with MDAC 2.1 SP2

Symptoms
Attempting to set the ActiveX Data Objects (ADO) recordset’s Cachesize property returns the following error message:

Run-time error ‘3001′:
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.This error occurs when Microsoft Data Access Component (MDAC) version 2.1 SP2 is installed on the computer and a JET OLEDB provider has been used to create the ADO connection.
Resolution
The current workaround is to use the Microsoft Access ODBC driver when creating the ADO connection.

PRB: Run-Time Error Message 430 with ADO Redistributed Application

Symptoms
When an ADO application is redistributed, it produces the following run-time error on the user’s computer:

Run-time Error 430
Class does not support automation or does not support expected interface.
Resolution
The application references one version of ADO and redistributes a different version of ADO.

PRB: Run-time Error Message 3024 Using SQL and DAO Against Oracle

Symptoms
If you try to run Structured Query Language (SQL) against an Oracledatabase through Data Access Objects (DAO), you can encounter the followingerror:

Run-Time Error 3024
Couldn’t find file C:\Program Files\DevStudio\VB\<schema name>.mdb.This error occurs when you try to specify a schema name in your SQLstatement and you use DAO with Oracle. The <schema name> in the errormessage is whatever schema name you specified for the Oracle object youreference.
Resolution
If you add the dbSQLPassThrough option to the OpenRecordset method, thesample code in the MORE INFORMATION section of this article runs withouterror. You can use brackets ([ ]) around the table name in the SQL string toavoid the error as well:

sql = “SELECT * FROM [scott.emp]” Also, you can use an advanced data access technology, such as ActiveX DataObjects (ADO) to avoid this error.

PRB: Run-Time Error 713 Opening Data Report in Distributed Application

Symptoms
You are distributing a Visual Basic application that includes a data report. After installation, you receive the following error when you attempt to open the data report from your application:

Run-time error ‘713′:Application-defined or object defined error
Resolution
The Data Report run-time file (Msdbrptr.dll) was not included in your setup package.

BUG: You receive a “Class not registered” error message in Visual Basic 6.0 project after you remove Visual Studio .NET or Visual Studio 2005

Symptoms
You have Visual Studio .NET or Visual Studio 2005 installed on your computer. You create a Visual Basic 6.0 project that has a control that is bound to a data source. When you remove Visual Studio .NET or Visual Studio 2005 and then run you Visual Basic 6.0 project, you receive the following error message:

Run-time error ‘713′:
Class not registered.
Looking for object with
CLSID:{59245250-7A2F-11D0-9842-00A0C91110ED}
Resolution
This problem occurs because the Component Object Model (COM) based MSBind.dll is unregistered when you remove Visual Studio .NET or Visual Studio 2005. Visual Basic 6.0 uses MSBind.dll to bind the control to the data source. Therefore, when you run a Visual Basic 6.0 project that has a data-bound control, you receive the run-time error message.

BUG: Run-Time Error Message -2147417848 (80010108) When Passing Array of Dictionary Objects

Symptoms
You have a Visual Basic ActiveX DLL that has a method that takes an array of Scripting Dictionary Objects as an argument. It may work fine when your Visual Basic client is run in the Visual Basic integrated development environment (IDE) by using this method, but when you run it as a compiled application, you get the following run-time error message:

Run-time error ‘-2147417848 (80010108)’:
Method ‘~’ of object ‘~’ failedThis only occurs when you use late binding to call the method.
Resolution
Use early binding to work around the problem.