Search found 27 matches
- 28.09.2018, 12:11
- Forum: ZeosLib 7.2 Forum
- Topic: MySQL, handling 0000-00-00 date
- Replies: 6
- Views: 3427
Re: MySQL, handling 0000-00-00 date
If I understand you correctly it means using something like SELECT CAST(DateColumn AS CHAR) FROM Table and than TZUpdate to save data to DB? This also means write conversion utilities to display date correctly with locale setting. So am currently thinking it is not better to save date as Int(8), bec...
- 28.09.2018, 10:11
- Forum: ZeosLib 7.2 Forum
- Topic: MySQL, handling 0000-00-00 date
- Replies: 6
- Views: 3427
Re: MySQL, handling 0000-00-00 date
I know about this SQL command. It is required for MySQL 5.7 and higher. SET sql_mode = ''; or SET GLOBAL sql_mode = ''; But the problem, I think, is in the conversion. It seems to me it does not know what to do with such dates, so it returns emty string when reading them from DB a produces conversio...
- 27.09.2018, 14:48
- Forum: ZeosLib 7.2 Forum
- Topic: MySQL, handling 0000-00-00 date
- Replies: 6
- Views: 3427
MySQL, handling 0000-00-00 date
Hi, is there a way how to handle '0000-00-00' date in Zeos? I can not access is as string (empty '' string is shown). E convert error is raised when trying to save value. I understand that it is not proper date, but this allows for storing uncomplete dates 1920-10-00, 0000-05-18, etc. Thanks for help.
- 27.09.2018, 13:08
- Forum: ZeosLib 7.2 Forum
- Topic: TZSQLProcessor, LAST_INSERT_ID(), MySQL
- Replies: 3
- Views: 1678
Re: TZSQLProcessor, LAST_INSERT_ID(), MySQL
Finally got back to this. Thank you for help.
I used LAST_INSERT_ID directly in the script as variable.
I used LAST_INSERT_ID directly in the script as variable.
- 18.08.2018, 15:06
- Forum: ZeosLib 7.2 Forum
- Topic: TZSQLProcessor, LAST_INSERT_ID(), MySQL
- Replies: 3
- Views: 1678
TZSQLProcessor, LAST_INSERT_ID(), MySQL
Hi, I am trying to get last inserted ID. Is something like below supossed to work? const LastStatusID: string = 'last_status_id' begin ZSQLProcessor.Connection := Connection1; ZSQLProcessor.ParamChar := '@'; ZSQLProcessor.Script.Clear; ZSQLProcessor.Script.Add('START TRANSACTION;'); ZSQLProcessor.Sc...
- 04.08.2018, 20:52
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] Query, keep selected record after refresh
- Replies: 4
- Views: 1076
Re: Query, keep selected record after refresh
Thank you for help.
- 29.07.2018, 20:56
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] Query, keep selected record after refresh
- Replies: 4
- Views: 1076
Re: Query, keep selected record after refresh
Well, I have 3 tables: "Status", "Status_Subject" and "Subject". "Status_Subject" is just linking table betwean the other two. There is a grid, that shows Status + all Subjects assigned to status. So when I add subject, list needs to be refreshed, but because ...
- 27.07.2018, 12:29
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] Query, keep selected record after refresh
- Replies: 4
- Views: 1076
[SOLVED] Query, keep selected record after refresh
Is there a way to force Query to keep selected record after refresh (based on primary key)?
Now it seems, that when any avalue is changed, first record is selected (I understand this must be the case when current record is deleted).
Now it seems, that when any avalue is changed, first record is selected (I understand this must be the case when current record is deleted).
- 25.07.2018, 13:40
- Forum: ZeosLib 7.2 Forum
- Topic: Query, Filter on calculated field
- Replies: 10
- Views: 1777
Re: Query, Filter on calculated field
Thank You very much. I studied FPTest/DUnit2, writing my first test now :-)
- 22.07.2018, 10:20
- Forum: ZeosLib 7.2 Forum
- Topic: Query, Filter on calculated field
- Replies: 10
- Views: 1777
Re: Query, Filter on calculated field
Hi, I wrote SQL scripts to create and fill database and small Delphi application to show the problem. DB connection parametres must be filled in code before connecting. I found in the test cases that database "people" is used, but haven't found exact structure - I tried to ques as much as ...
- 19.07.2018, 09:39
- Forum: ZeosLib 7.2 Forum
- Topic: Query, Filter on calculated field
- Replies: 10
- Views: 1777
Re: Query, Filter on calculated field
Is there anything I can add to help solving this issue?
- 19.07.2018, 09:31
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] 0 recod(s) updated. Only one record should have been updated.
- Replies: 6
- Views: 4678
Re: 0 recod(s) updated. Only one record should have been updated.
Thanks for help, problem solved now. Will watch the ticket to see, how it develops.
- 17.07.2018, 10:25
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] 0 recod(s) updated. Only one record should have been updated.
- Replies: 6
- Views: 4678
Re: 0 recod(s) updated. Only one record should have been updated.
Dataset is set to:
UpdateMode=umUpdateChanged
I am also adding image, to be sure.
UpdateMode=umUpdateChanged
I am also adding image, to be sure.
- 16.07.2018, 20:13
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] 0 recod(s) updated. Only one record should have been updated.
- Replies: 6
- Views: 4678
Re: 0 recod(s) updated. Only one record should have been updated.
Hi, I am using MySQL 5.1.73 TZConnection.Protokol=mysql5 SVN: http://svn.code.sf.net/p/zeoslib/code-0/branches/7.2-patches Of couse that setting the same value is specific, but this means it also happens when using LookupComboBox (when user wants to see what values are available: he clicks the Combo...
- 15.07.2018, 21:56
- Forum: ZeosLib 7.2 Forum
- Topic: [SOLVED] 0 recod(s) updated. Only one record should have been updated.
- Replies: 6
- Views: 4678
[SOLVED] 0 recod(s) updated. Only one record should have been updated.
Hi, I have quite complicated query that join multiple tables so for updating TZUpdateSQL is used. ModifySQL code: UPDATE Job SET ID = :ID, Owner = :Owner, ... WHERE ID = :Old_ID This works OK, but ONLY if the record really changes. When I modify some field but the value at the end remains the same e...