On Sat, Oct 10, 2009 at 11:57:30PM +0200, Ron Arts scratched on the wall:

> I'm expanding my benchmark to test just thaty, but I'm running into a problem.
> Here's my code (well part of it):
> 
>    sqlite3_stmt *stmt;
>    rc = sqlite3_prepare(db, "select name from company where id = '?'", -1, 
> &stmt, NULL);


> The sqlite3_bind_int immediately gives me an RANGE_ERROR (25).
> Is there some obvious thing I'm doing wrong?

  Remove the single quotes.  They aren't required for parameters, even
  if you're binding a text value.

  As written, that statement has a single character string literal and
  no parameters.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to