Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-16 Thread Michael Van Canneyt via fpc-pascal
On Fri, 16 Dec 2022, Ondrej Pokorny via fpc-pascal wrote: Hello, I've got a similar problem about 2 days ago. I have a stored MSSQL procedure that changes a table. When it is run in SQL Managements Studio, the data get changed. When I run it with FPC, it runs fine but nothing changes. I

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-16 Thread Michael Van Canneyt via fpc-pascal
On Fri, 16 Dec 2022, Andi Friess via fpc-pascal wrote: Am 16.12.2022 um 08:50 schrieb Michael Van Canneyt via fpc-pascal: ApplyUpdates as you use it, is not the correct solution. Once more: ApplyUpdates ONLY makes sense after changing data and doing a Post. Any other use does not make any

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-16 Thread Ondrej Pokorny via fpc-pascal
Hello, I've got a similar problem about 2 days ago. I have a stored MSSQL procedure that changes a table. When it is run in SQL Managements Studio, the data get changed. When I run it with FPC, it runs fine but nothing changes. I do commit the transaction explicitly but the data isn't

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-16 Thread Andi Friess via fpc-pascal
Am 16.12.2022 um 08:50 schrieb Michael Van Canneyt via fpc-pascal: ApplyUpdates as you use it, is not the correct solution. Once more: ApplyUpdates ONLY makes sense after changing data and doing a Post. Any other use does not make any sense. Data is changed by the SP. But this is done in a

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Michael Van Canneyt via fpc-pascal
On Fri, 16 Dec 2022, Andi Friess via fpc-pascal wrote: Am 15.12.2022 um 14:59 schrieb Michael Van Canneyt via fpc-pascal: On Thu, 15 Dec 2022, Andreas Frieß via fpc-pascal wrote: Post operation. No, if you use a stored procedure on the MSSQL Server there can be changes on tables.

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Andi Friess via fpc-pascal
Am 15.12.2022 um 14:59 schrieb Michael Van Canneyt via fpc-pascal: On Thu, 15 Dec 2022, Andreas Frieß via fpc-pascal wrote: Post operation. No, if you use a stored procedure on the MSSQL Server there can be changes on tables. Without the ApplyUpdates these changes are not persitent. If you

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Michael Van Canneyt via fpc-pascal
On Thu, 15 Dec 2022, Andreas Frieß via fpc-pascal wrote: Post operation. No, if you use a stored procedure on the MSSQL Server there can be changes on tables. Without the ApplyUpdates these changes are not persitent. If you close and reopen the connection ALL is lost. With ApplyUpdates it

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Andreas Frieß via fpc-pascal
Am 15.12.2022 um 11:15 schrieb Michael Van Canneyt via fpc-pascal: On Thu, 15 Dec 2022, Andreas Frieß via fpc-pascal wrote: On MSSQL i use a stroed procedure to count a value in a table and use the following statement in Lazarus 1.     procedureTForm1.BuExecuteClick(Sender:TObject); 2.    

Re: [fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Michael Van Canneyt via fpc-pascal
On Thu, 15 Dec 2022, Andreas Frieß via fpc-pascal wrote: On MSSQL i use a stroed procedure to count a value in a table and use the following statement in Lazarus 1. procedureTForm1.BuExecuteClick(Sender:TObject); 2. var 3.   SQL:string; 4. begin 5.   Memo1.Clear; 6.  

[fpc-pascal] SqlDB TSQLQuery sqoAutoApplyUpdates does not work with ExecSQL

2022-12-15 Thread Andreas Frieß via fpc-pascal
On MSSQL i use a stroed procedure to count a value in a table and use the following statement in Lazarus 1. procedureTForm1.BuExecuteClick(Sender:TObject); 2. var 3.   SQL:string; 4. begin 5.   Memo1.Clear; 6.   SQL:=''; 7.   SQL:='EXECUTE [dbo].[GetNextZaehler]