RE: [lazarus] SQL Statement

2006-03-17 Thread Panagiotis Sidiropoulos
wn. Did you realy think that I could bother list members with such a question if getting this clear message from my application? :-) Panagiotis -Original Message- From: Joost van der Sluis [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 12:33 PM To: lazarus@miraclec.com Subject: R

RE: [lazarus] SQL Statement

2006-03-17 Thread Joost van der Sluis
> >Cause now I still don't know if it's a bug or not. > > No, it is not a bug. Non-Select statements need .ExecSQL method, not .open. I > had a couple of replies on this, tested and confirmed. I'm still curious if you've got the error message 'Cannot open a non- select statement' or not. (when y

RE: [lazarus] SQL Statement

2006-03-17 Thread Panagiotis Sidiropoulos
onfirmed. Regards, Panagiotis -Original Message- From: Joost van der Sluis [mailto:[EMAIL PROTECTED] Sent: Thursday, March 16, 2006 1:03 PM To: lazarus@miraclec.com Subject: Re: [lazarus] SQL Statement What I missed in this question, and the one before, is the error-message you've got

RE: [lazarus] SQL Statement

2006-03-17 Thread Panagiotis Sidiropoulos
exceptions my own. Thank you. Panagiotis -Original Message- From: Graeme Geldenhuys [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 10:32 AM To: lazarus@miraclec.com Subject: Re: [lazarus] SQL Statement There is no problem with the error message. Did a quick test and it returns

Re: [lazarus] SQL Statement

2006-03-17 Thread Graeme Geldenhuys
There is no problem with the error message. Did a quick test and it returns "Cannot open a non-select statement" - so all is fine. Regards, - Graeme - -- There's no place like 127.0.0.1 _ To unsubscribe: mail [EMAIL PROTECTE

Re: [lazarus] SQL Statement

2006-03-16 Thread Joost van der Sluis
What I missed in this question, and the one before, is the error-message you've got. It should be: 'Cannot open a non-select statement' If you had asked the question: What do I do wrong when I got: 'Cannot open a non-select statement', everyone here with some sql-knowledge would have known the ans

Re: [lazarus] SQL Statement

2006-03-15 Thread Graeme Geldenhuys
On 3/16/06, Panagiotis Sidiropoulos <[EMAIL PROTECTED]> wrote: > Yes, you are right, .Open method is not appropriate for UPDATE > statement, .ExecSQL is the one that does what I expect to. > > Thank you for your help, I realy appreciate it. > > Panagiotis Glad I could help! One has to start some

Re: [lazarus] SQL Statement

2006-03-15 Thread Panagiotis Sidiropoulos
Graeme also suggested similar approach, tested by me and confirmed. It is maybe elementary knowledge but not for unexperienced SQL users like me. Thank you for your time. Panagiotis Στις 15-03-2006, ημέρα Τετ, και ώρα 15:51 -0500, ο/η Alexandre Leclerc έγραψε: > On 3/15/06, Panagiotis Sidiropoul

Re: [lazarus] SQL Statement

2006-03-15 Thread Alexandre Leclerc
On 3/15/06, Panagiotis Sidiropoulos <[EMAIL PROTECTED]> wrote: > Graeme also suggested similar approach, tested by me and confirmed. It > is maybe elementary knowledge but not for unexperienced SQL users like > me. Thank you for your time. Indeed, you are right. (It was obivious for me, but many o

Re: [lazarus] SQL Statement

2006-03-15 Thread Alexandre Leclerc
On 3/15/06, Panagiotis Sidiropoulos <[EMAIL PROTECTED]> wrote: > SQLQuery.Open; Well, in Delphi the error would be obivious. 'Open' is for select statement, all other statements must be 'Execute'. So try something like: SQLQuery.Execute; (This is from memory, the actual procedure/function c

Re: [lazarus] SQL Statement

2006-03-15 Thread Panagiotis Sidiropoulos
Yes, you are right, .Open method is not appropriate for UPDATE statement, .ExecSQL is the one that does what I expect to. Thank you for your help, I realy appreciate it. Panagiotis Στις 15-03-2006, ημέρα Τετ, και ώρα 21:29 +0200, ο/η Graeme Geldenhuys έγραψε: > > SQLQuery.Close; > > SQLQuery.SQL

Re: [lazarus] SQL Statement

2006-03-15 Thread Panagiotis Sidiropoulos
> SQLQuery.SQL.Add( 'update `ids-aa`' ); > SQLQuery.SQL.Add( 'set `ids-licenses-left`=1' ); > SQLQuery.SQL.Add( 'where `ids-internet-id`="aa-123456789012345678"' ); "ids-aa", "ids-licenses-left", "ids-internet-id" are field names into "ids-aa" table. "aa-123456789012345678" is content of record in

Re: [lazarus] SQL Statement

2006-03-15 Thread Panagiotis Sidiropoulos
It is not my intention being irritating, on the contrary. Composing this post I thought that subject was describing the problem, focusing on the SQL statement syntax and not to the code. I apologise. Your answer gives me the impression that you are tired reading this kind of not well described post

Re: [lazarus] SQL Statement

2006-03-15 Thread johnf
On Wednesday 15 March 2006 13:36, Panagiotis Sidiropoulos wrote: > Additionaly to my original post, this query is executed under Linux > using sqldb components TSQLQuery, TSQLtransaction and > TMySQL41Connection. If any additional information is required please > just task. > > Στις 15-03-2006, ημέ

Re: [lazarus] SQL Statement

2006-03-15 Thread Panagiotis Sidiropoulos
Additionaly to my original post, this query is executed under Linux using sqldb components TSQLQuery, TSQLtransaction and TMySQL41Connection. If any additional information is required please just task. Στις 15-03-2006, ημέρα Τετ, και ώρα 21:14 +, ο/η Panagiotis Sidiropoulos έγραψε: > I use fol

Re: [lazarus] SQL Statement

2006-03-15 Thread Joost van der Sluis
This is gettig irritating. 'statement is not accepted' Is that the error message? 'statement not accepted' You can't expect us to keep answering this kind of questions. An why all these quotes arount the field names? Does that even compile? And read this, before you sent another question: www.c

Re: [lazarus] SQL Statement

2006-03-15 Thread Graeme Geldenhuys
> SQLQuery.Close; > SQLQuery.SQL.Clear; > SQLQuery.SQL.Add( 'update `ids-aa`' ); > SQLQuery.SQL.Add( 'set `ids-licenses-left`=1' ); > SQLQuery.SQL.Add( 'where `ids-internet-id`="aa-123456789012345678"' ); All I can think of, is to make sure you leave spaces between the different line, so when that