add first your parameters "@artnew" and "@artold" to the parameters collection of your "fbc" command object before assigning values. in vb.net it should look someting like this: 'add your parameters to the parameters collection 'your "fbc" command object fbc.parameters.add("@artnew", fbdbtype.string) fbc.parameters.add("@artold", fbdbtype.string) 'then assign values fbc.parameters("@artnew").value = param1; fbc.parameters("@artold").value = param2; ' then execute the query fbc.executenonquery;
--- Mercea Paul <[EMAIL PROTECTED]> wrote: > Hi > I get error running parametrised query in a > procedure ! > Query looks like: > ExecuteSQL("update RetTable set [EMAIL PROTECTED] where > (ciknum [EMAIL PROTECTED])", > artnew, artold, fbConnRetTable); > > Procedure looks like > public static void ExecuteSQL(string strSQL, string > param1, string param2, > FbConnection dbcon) > { > FbCommand fbc = new FbCommand(strSQL, > dbcon); > fbc.Parameters[0].Value = param1; <- > Here ocurs error! > fbc.Parameters[1].Value = param2; > fbc.ExecuteNonQuery(); > } > > > Errors sounds like: > Additional information: Index was out of range. Must > be non-negative and > less than the size of the collection. > > What I'm doing wrong? > Tia, > Paul > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> _______________________________________________ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > ____________________________________________________________________________________ Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider