invalid index -1 for this parameters

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
wom

invalid index -1 for this parameters

Post by wom » Sun 10 Jul 2005 16:20

hi i'm using a unidirect dataadapter with a select command text as follows:
Select * from bill where reference=@reference and period = @ period;

bill is a table in mysql
reference is and int tablecolumn
@reference is an int parameter
period is a date tablecolumne
@period is a date parameter

when i try it out with just account reference in the where clause it seems to work fine, but when the secon condition of the where clause(period) is added i seem to be getting the error:
invalid index -1 for this parameters.

could anybody tell me what i am missing

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by Oleg » Mon 11 Jul 2005 08:14

The problem is in space character between "@" and "period". Try writing it together as "@period", and remove semicolon at the end of your statement.

Post Reply