Page 1 of 1

invalid index -1 for this parameters

Posted: Sun 10 Jul 2005 16:20
by wom
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

Posted: Mon 11 Jul 2005 08:14
by Oleg
The problem is in space character between "@" and "period". Try writing it together as "@period", and remove semicolon at the end of your statement.