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."

How I can work with properties en .NET?


thanks...
pablo

Re: Properties in VB = Parameters in .NET?? by Marc

Marc
Thu Feb 19 11:49:19 CST 2004

Try this article:

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemDataOle
DbOleDbCommandClassParametersTopic.htm

Marc

"Pablo Ricco" <nepari@adinet.com.uy> wrote in message
news:eJBkIcw9DHA.2168@TK2MSFTNGP12.phx.gbl...
> 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."
>
> How I can work with properties en .NET?
>
>
> thanks...
> pablo
>
>



RE: Properties in VB = Parameters in .NET?? by anonymous

anonymous
Thu Feb 19 11:51:10 CST 2004

Pablo
That message is saying that the provider does not support parameters for that datasource. In other words, you cannot use parameters

Tu-Thac
www.ongtech.co

----- Pablo Ricco wrote: ----

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

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

But in .NET.

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

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

How I can work with properties en .NET


thanks..
pabl




Re: Properties in VB = Parameters in .NET?? by Pablo

Pablo
Thu Feb 19 12:49:57 CST 2004

Ok...
but in Visual Basic (6.0) no have problems....
How I can use properties like en Visual Basic 6.0???

"Tu-Thach" <anonymous@discussions.microsoft.com> escribió en el mensaje
news:38FE8287-6D4F-42DD-88B1-6EE86452741B@microsoft.com...
> Pablo,
> That message is saying that the provider does not support parameters for
that datasource. In other words, you cannot use parameters.
>
> Tu-Thach
> www.ongtech.com
>
> ----- Pablo Ricco wrote: -----
>
> 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."
>
> How I can work with properties en .NET?
>
>
> thanks...
> pablo
>
>
>



Re: Properties in VB = Parameters in .NET?? by Paul

Paul
Fri Feb 20 08:59:30 CST 2004

On Thu, 19 Feb 2004 13:40:03 -0300, "Pablo Ricco" <nepari@adinet.com.uy> wrote:

¤ 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."
¤

Are you certain the parameter data type is correct? It appears you are using a string data type,
which probably should be Data.OleDb.OleDbType.VarWChar. Your example is declaring
System.Data.OleDb.OleDbType.SmallInt (2).


Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)