Invalid index 0 for this Parameters.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
daner06
Posts: 6
Joined: Tue 03 Jan 2006 09:41

Invalid index 0 for this Parameters.

Post by daner06 » Tue 04 Apr 2006 22:04

Hi,

With this code :

Code: Select all

        Me.UniConnection1.Open()
        Me.UniCommand1.CommandText = Me.TextBox1.Text
        Me.UniCommand1.ExecuteNonQuery()
        Me.UniConnection1.Close()
I have this query in Me.TextBox1.Text :

Code: Select all

INSERT INTO t_etat (Id, IdTypeEtat, Nom, Origine, Defaut, RssXML, IdEtatOrigine) VALUES (2, 9, 'Avoir d\achat', 1, 1, 'good ?', 1)
When I execute the code, I have this error :
Invalid index 0 for this Parameters.
But I don't have parameter, it's the contents of the field ("good ?")

Is there a property to diseable the parameters?

How can I do?

Thanks. :wink:

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 05 Apr 2006 07:05

The problem is that UniDirect parses the statement incorrectly. We are working on this problem.
To use apostrophe (') enclose your string value in quotation marks ("..."). E.g.: 'Avoir d\achat' should be "Avoir d\achat" or "Avoir d'achat".

daner06
Posts: 6
Joined: Tue 03 Jan 2006 09:41

Post by daner06 » Wed 05 Apr 2006 07:41

ok, thanks.

Regards

Post Reply