Page 1 of 1

Invalid index 0 for this Parameters.

Posted: Tue 04 Apr 2006 22:04
by daner06
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:

Posted: Wed 05 Apr 2006 07:05
by Alexey
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".

Posted: Wed 05 Apr 2006 07:41
by daner06
ok, thanks.

Regards