 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
p.dr Guest
|
Posted: Mon Feb 13, 2006 5:03 pm Post subject: MySQL/Delphisyntax - parsing variable to commmandtext |
|
|
Hello,
whats wrong with following syntax?
SQLDataset1.CommandText:=('SELECT * FROM history WHERE (date<=dint2 AND
date>=dint1)');
dint1 and dint2 are String variables
something like bellow works fine:
SQLDataset1.CommandText:=('SELECT * FROM history WHERE
(date<="2005-02-01" AND date>="2005-01-01")');
but I need to parse variable to SQL syntax
Thanks, Paul |
|
| Back to top |
|
 |
p.dr Guest
|
Posted: Mon Feb 13, 2006 7:03 pm Post subject: Re: MySQL/Delphisyntax - parsing variable to commmandtext |
|
|
Hello folks,
solved myself:
SQLDataset1.CommandText:=('SELECT * FROM history WHERE
(date<='+QuotedStr(dint2)+' AND date>='+QuotedStr(dint1)+')');
See ya
Message by p.dr <p.dr> on: 13.2.2006 8:37:32
| Quote: | Hello,
whats wrong with following syntax?
SQLDataset1.CommandText:=('SELECT * FROM history WHERE (date<=dint2 AND
date>=dint1)');
dint1 and dint2 are String variables
something like bellow works fine:
SQLDataset1.CommandText:=('SELECT * FROM history WHERE
(date<="2005-02-01" AND date>="2005-01-01")');
but I need to parse variable to SQL syntax
Thanks, Paul
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|