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 ‘time error’

FIX: ADO: Unable To Update Memo Field > 64K In Access Database

Symptoms
An attempt to update a large (64K or greater) memo field in a client-siderecordset using the Jet 3.51 OLE DB provider results in one of the followingerrors:

Errors occurred.
Run-time error ‘-2147217887(80040e21)’:-or-

Run-time error ‘-2147217259(80040005)’:Data provider or other service returned an E_FAIL status.
Resolution
This problem is caused by a bug in the Microsoft OLE DB Provider for Jetversion 3.51.

BUG: Visual Basic 6.0 cannot use the .NET method with the ParamArray parameter in Visual Studio .NET

Symptoms
Microsoft Visual Basic version 6.0 cannot use the .NET method with the ParamArray parameter in Microsoft Visual Studio .NET. A compile-time error is generated by Visual Basic version 6.0 when it tries to consume the .NET method that has the ByRef ParamArray parameter or the ByRef Structure parameter.
When the .NET method has the ByRef ParamArray parameter, you receive the following error message:

Compile error:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic
When the .NET method has the ByRef Structure parameter, you receive the following error message:

Compile error:
User-defined type may not be passed ByVal
Resolution
This problem occurs because Visual Basic version 6.0 does not let the ParamArray parameter and the Structure parameter be passed to the BYVAL value. This problem occurs with a .NET property because a .NET property does not let property parameters be defined by the BYREF value.