Properties in VB = Parameters in .NET??

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
 
J

Jay B. Harlow [MVP - Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top