Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Felipe Monteiro de Carvalho wrote: Hello, Taking advantage that we are already talking about SQL how to upload the contents of a blob field? I tried using a SELECT to get the field + TBlobField(FQuery.FieldByName('Data')).LoadFromStream but it raises an exception th

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Felipe Monteiro de Carvalho
Hello, Taking advantage that we are already talking about SQL how to upload the contents of a blob field? I tried using a SELECT to get the field + TBlobField(FQuery.FieldByName('Data')).LoadFromStream but it raises an exception that "Dataset is not in insert or edit mode" I see that I coul

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Stephen Chrzanowski
Nevermind... Ninja'd. On Wed, Feb 10, 2016 at 10:36 AM, Stephen Chrzanowski wrote: > Did you output the iSQL string to a console or a text file or even a > message box to verify that what you're passing in is actually what you > expect? > > If the engine is coming back with a problem "Near Selec

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Stephen Chrzanowski
Did you output the iSQL string to a console or a text file or even a message box to verify that what you're passing in is actually what you expect? If the engine is coming back with a problem "Near Select" then there is something wrong either before the string, or after Select. GetTableName may b

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Felipe Monteiro de Carvalho
On Wed, Feb 10, 2016 at 1:20 PM, Michael Van Canneyt wrote: > You used sql.add. Did you do sql.clear first ? > Otherwise you'll be sending 2 sql statements as 1. ok, that fixed the issue, thanks! -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Felipe Monteiro de Carvalho wrote: On Wed, Feb 10, 2016 at 12:45 PM, Michael Van Canneyt wrote: Did you try clearing SQL first ? What do you mean? You used sql.add. Did you do sql.clear first ? Otherwise you'll be sending 2 sql statements as 1. Michael. ___

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Felipe Monteiro de Carvalho
Result in sqlite3 console: sqlite> SELECT * FROM "Header_0" WHERE ID=0; 0|0|0|0|18| -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Felipe Monteiro de Carvalho
On Wed, Feb 10, 2016 at 12:45 PM, Michael Van Canneyt wrote: > Did you try clearing SQL first ? What do you mean? -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/li

Re: [fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Michael Van Canneyt
On Wed, 10 Feb 2016, Felipe Monteiro de Carvalho wrote: Hello, I'm posting here because this seams to be an issue with using sqldb, my SQL seams to be ok. I create a table and add a row to it, but when trying to read that same row using SELECT I get EDatabase error with message "Syntax error

[fpc-pascal] EDatabaseError on SELECT

2016-02-10 Thread Felipe Monteiro de Carvalho
Hello, I'm posting here because this seams to be an issue with using sqldb, my SQL seams to be ok. I create a table and add a row to it, but when trying to read that same row using SELECT I get EDatabase error with message "Syntax error near SELECT". I create the Table and add a row to it like t