Properties in VB = Parameters in .NET??

  • Thread starter Thread starter Pablo Ricco
  • Start date Start date
P

Pablo Ricco

Hi!
I have this problem...
In Visual Basic I am work with ADODB and the next code work perfectly...

Dim cmd as New ADODB.Command
cmd.Properties(15).Value = 2
....

But in .NET..

OleDbCommand cmd = new OleDbCommand();
cmd.Parameters.add("15",2);
....

this code throws an error:
"An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.dll
Additional information: The ICommandWithParameters interface is not
supported by the 'GXPublic.GXPublic.3' provider. Command parameters are
unsupported with the current provider."


thanks...
pablo
 
Pablo,
OleDbParameters are the same as ADODB.Parameters, not ADODB.Properties!

What is the 'GXPublic.GXPublic.3' provider? Why is it expecting
ADODB.Properties over ADODB.Parameters?

I don't see a way to set OLE DB Properties from ADO.NET, you may want to ask
this "down the hall" in the microsoft.public.dotnet.framework.adonet
newsgroup, as most of the regulars in that newsgroup are have more
experience working with ADO.NET.

Note: You can still use ADODB from .NET, which may be an option for you if
the 'GXPublic.GXPublic.3' provider requires "properties" to be set to use
it.

Hope this helps
Jay
 
Back
Top