Syntax clarification

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax clarification

Dave Delage
I've searched without success for this answer. I use SQLite3, Zeos and
Delphi so maybe this isn't a perfectly sqlite3 question but here goes:

  What are the pros/cons of query.sql.text := 'some string'; versus 
query.sql.add('some string');

Dave






---
This email has been checked for viruses by AVG.
https://www.avg.com

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Syntax clarification

Jens Alfke-2


> On Dec 28, 2018, at 3:25 PM, Dave Delage <[hidden email]> wrote:
>
>  What are the pros/cons of query.sql.text := 'some string'; versus  query.sql.add('some string');

That sounds like a Delphi (Pascal?) question, not anything about SQLite itself.

I haven’t used Pascal since the 1980s, but it looks like the first form assigns a string directly while the second appends to a string. Use whichever one is appropriate...

—Jens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Syntax clarification

Stephen Chrzanowski
In reply to this post by Dave Delage
The .add indicates you're using some kind of dictionary type of class like
a tStringList and would append that string to the end of that dictionary.
The .Text would replace the contents of the dictionary with that string.


On Friday, December 28, 2018, Dave Delage <[hidden email]> wrote:
> I've searched without success for this answer. I use SQLite3, Zeos and
Delphi so maybe this isn't a perfectly sqlite3 question but here goes:
>
>  What are the pros/cons of query.sql.text := 'some string'; versus
query.sql.add('some string');

>
> Dave
>
>
>
>
>
>
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users