On Thu, 10 Sep 2015 13:17:03 -0400 H?ctor Fiandor <hfiandor at ceniai.inf.cu> wrote:
> Dear members: > > I am trying to use a SQL statement like this: > > fdm.tNegSerAct.SQL:='SELECT * FROM NegSerAct > > WHERE codNegSerAct >=desde AND codNegSerAct <=hasta > > ORDER BY codNegSerAct'; > but the trouble is that the variables ?desde? and ?hasta? are > strings and fixed previously. > I have learned the SQLdb Tutorial2 but the offered solution don?t > work. > > I will appreciate any help in the solution of this problem. It looks like you're using lazarus/freepascal fo it, but, there's no difference from c code. 'desde' and 'hasta' variables must have a name that sqlite3_bind() function can recognize and change with variable value. Check this page, http://www.sqlite.org/c3ref/bind_blob.html as refence to sqlite3_bind(). Proper value names are ,'?' , '?NNN', ':VVV', '@VVV', '$VVV$; where '?' is for one variable case, 'NNN' is any number from 0 to 999 and 'VVV' alphanumeric values. In your case, use '?des' y '?has'. > > > Thanks in advance > > > > Ing. H?ctor Fiandor > > hfiandor at ceniai.inf.cu > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users --- --- Eduardo Morras <emorrasg at yahoo.es>