Re: [Lazarus] SQLTransaction won't start
It won't start even when I execute a query. After q.open the transaction is still not active. I think, it should start after StartTransaction is called, not after first query. Petr 2014-03-14 19:39 GMT+01:00 Marc Santhoff m.santh...@web.de: On Fr, 2014-03-14 at 18:37 +0100, Petr Hlozek wrote: It's the name of database. My testing database is called test. I posted the table create command to infom about db engine I use for it. Oops. ;) Maybe the TSQLQuery instance hinders the transaction from goping active, because it's SQL is empty or similar. Marc -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
It's inactive even after I execute a query. If AUTO COMMIT is set to 0 ,the changes are not saved to database. Very bad. Yes, I could use other DB components, but my app already has over 60k lines of code, several threads connected to DB etc. It won't be easy to move to something else :(. Petr 2014-03-14 19:46 GMT+01:00 silvioprog silviop...@gmail.com: 2014-03-14 11:55 GMT-03:00 Petr Hlozek p...@ok2cqr.com: Yes, I did. It's in uses like mysql55conn. Petr Hm... Try to set a SQL in your query, after, use the q.Open (the starttransaction will automaticaly triggered) method, checking if transaction keeps inactive. justa a tip: take a little time to see this nice and slim project: https://github.com/silvioprog/dopf.. ;) -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- http://HamQTH.com/ok2cqr http://ok2cqr.com http://cqrlog.com http://cqrtest.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
2014-03-15 3:06 GMT-03:00 Petr Hlozek p...@ok2cqr.com: It's inactive even after I execute a query. If AUTO COMMIT is set to 0 ,the changes are not saved to database. Very bad. Very very bat. Yes, I could use other DB components, but my app already has over 60k lines of code, several threads connected to DB etc. It won't be easy to move to something else :(. Can you test it in latest FPC 2.6.4 (using a virtual machine, sure)? -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
I wanted to find out where is the problem and started with breakpoint on db := TMySQL55Connection.Create. It went fine until it reached db.Open line. After I hit F8 on this line, it hangs. Next time it hangs on tr.StartTransaction with this error: The GDB command: ptype tr.StartTransaction did not return any result. Very sad :(. It seems I have to try it in virtual machine with latest FPC and Lazarus. It will be interesting but I can't use it. It won't be part of Ubuntu 12.04, it's not in Debian, yet :(. Petr 2014-03-15 7:13 GMT+01:00 silvioprog silviop...@gmail.com: 2014-03-15 3:06 GMT-03:00 Petr Hlozek p...@ok2cqr.com: It's inactive even after I execute a query. If AUTO COMMIT is set to 0 ,the changes are not saved to database. Very bad. Very very bat. Yes, I could use other DB components, but my app already has over 60k lines of code, several threads connected to DB etc. It won't be easy to move to something else :(. Can you test it in latest FPC 2.6.4 (using a virtual machine, sure)? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Console app
Hi All, I have never written a console app and was wondering 2 things. Firstly, if I was to write an app that doesn't require a GUI, that runs on both Windows and Linux (with no XServer) is that classed as a console app? And secondly, is it fairly straight forward to write a console app that stores and retrieves data from a Firebird database, on the basis that I want to be able to use either the standard Lazarus components (or Zeos) to talk to the database? Thanks in advance Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Console app
On 15/03/2014 08:10, Richard Mace wrote: I have never written a console app and was wondering 2 things. Firstly, if I was to write an app that doesn't require a GUI, that runs on both Windows and Linux (with no XServer) is that classed as a console app? Yes, it would. And secondly, is it fairly straight forward to write a console app that stores and retrieves data from a Firebird database, on the basis that I want to be able to use either the standard Lazarus components (or Zeos) to talk to the database? Well, they're standard FPC components[1] rather than Lazarus components then... (So follow up questions probably belong on the FPC list rather than the Lazarus one) See http://wiki.lazarus.freepascal.org/Database_bug_reporting#FreePascal for a simple example, but you can work with queries etc just as you're used to with Lazarus [1] FPC's sqldb, which is also used by Lazarus GUI components -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Console app
On Sat, 15 Mar 2014 07:10:27 + Richard Mace richard.m...@gmail.com wrote: Hi All, I have never written a console app and was wondering 2 things. Firstly, if I was to write an app that doesn't require a GUI, that runs on both Windows and Linux (with no XServer) is that classed as a console app? Yes. And secondly, is it fairly straight forward to write a console app that stores and retrieves data from a Firebird database, on the basis that I want to be able to use either the standard Lazarus components (or Zeos) to talk to the database? Yes. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Suggestion for IDE
On Fri, Mar 14, 2014 at 10:07 PM, FreeMan freema...@delphiturkiye.com wrote: No, not YET, because I'm still learning and I'm not expert. I'm using rxset, I added #0025524. I have one more, I will add after more test. Ok, your patch is for Rx library in CCR. It is assigned (maybe automatically) to Lagunov Aleksey. The wiki page: http://wiki.lazarus.freepascal.org/RXfpc has a comment by Matthijs : If someone knows how the authors can be contacted, please tell us. My russian is not too good. Does it mean Lagunov Aleksey is not actively maintaining it and nobody knows how to contact him? Could you try contacting him somehow? In any case your patch cannot be applied because it has no source file information. It has only a dot (.). $ patch -p0 ~/patch/Freeman_rxpatch_2.diff patch: File . is not a regular file -- can't patch Additionally, a patch should be made from a top level directory so path information is included, too. Easier to apply. Like: svn diff trunk/rxsomething.pas myrx.diff You have included formatting changes together with actual code changes. They should be separated as much as possible. Respect the style of surrounding code is the basic rule, although it is broken often. You have commented out some lines instead of removing them. Just remove them, the changes will be visible in SVN history. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Suggestion for IDE
1. Why have disabled AutoSort? 2. The formatting of the source code does not need to change anything - let the style is classical. В Пт, 14/03/2014 в 22:07 +0200, FreeMan пишет: Did you try helping by providing source code? No, not YET, because I'm still learning and I'm not expert. I'm using rxset, I added #0025524. I have one more, I will add after more test. I wrote TExlookup Component, my plan I share it too but need more work on it. IDE code more complicated for me (yet) And I send my install and update svn fpc lazarus script. Just don't forget everyone has not now all code and/or expert. We can do Pascal source code. Yes, absolutely right. regards 14-03-2014 21:27 tarihinde, Juha Manninen yazdı: Yes Juha, FreeSparta is good viewing on video, But he wrote Already done by me :D and no share or detail. so, for get it, what we can do our self? We can do Pascal source code. Regards, Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
On Sa, 2014-03-15 at 07:23 +0100, Petr Hlozek wrote: I wanted to find out where is the problem and started with breakpoint on db := TMySQL55Connection.Create. It went fine until it reached db.Open line. After I hit F8 on this line, it hangs. Next time it hangs on tr.StartTransaction with this error: The GDB command: ptype tr.StartTransaction did not return any result. So this looks like your tarnsaction cannot connect to the database burt you're getting no error message but a hang. You could - check that anything inbetween your program and the database is actually working. Using another client program may help to narrow down the target - turn on logging for mysql temporarily (the log fills up fast) and check if mysql sees the connection attempt - instead of stepping over the first erroneous line step into and look what happens in detail HTH, Marc -- Marc Santhoff m.santh...@web.de -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus Wiki
On Fri, Mar 14, 2014 at 02:11:11PM +0100, Michael Van Canneyt wrote: Reading is outdated.? Just do screenshots or publish a tutorial video on Youtube :)? Eh... No, please, I actually prefer reading :) I never watch videos. They are always on the wrong speed for me. Too sloow. Ditto. Never the right speed, and really badly crossreferenced :-) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] SQLTransaction won't start
Unfortunately this problem is only when I try to run the app in Lazarus and put breakpoit somewhere. When I run it directly in terminal, it always will connect to database, I can run queries, get results but transaction is still not active like it was in the example. 2014-03-15 13:14 GMT+01:00 Marc Santhoff m.santh...@web.de: On Sa, 2014-03-15 at 07:23 +0100, Petr Hlozek wrote: I wanted to find out where is the problem and started with breakpoint on db := TMySQL55Connection.Create. It went fine until it reached db.Open line. After I hit F8 on this line, it hangs. Next time it hangs on tr.StartTransaction with this error: The GDB command: ptype tr.StartTransaction did not return any result. So this looks like your tarnsaction cannot connect to the database burt you're getting no error message but a hang. You could - check that anything inbetween your program and the database is actually working. Using another client program may help to narrow down the target - turn on logging for mysql temporarily (the log fills up fast) and check if mysql sees the connection attempt - instead of stepping over the first erroneous line step into and look what happens in detail HTH, Marc -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Windows.PostMessage vs Application.QueueAsyncCall
Hi, Like all Windows programmer, I use PostMessage/SendMessage a lot. Lazarus team has created Application.QueueAsyncCall method to substitute the (old) Windowish method todo async calls aka PostMessage. Ok. But what is the best way to use QueueAsyncCall when the caller to not knows what type is the receiver? PostMessage only need to know a Handler and a Integer (message). It can send a broadcast message as well. QueueAsyncCall need to know the instance and the method to call... So, what the best way to substitute PostMessage? Maybe using QueueAsyncCall + IFPObserved/IFPObserver? Thanks, Marcos Douglas -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus