Search found 27 matches
- 09.12.2018, 16:42
- Forum: Lazarus / Freepascal
- Topic: How to get for cacheddataset oldvalue from specific row?
- Replies: 3
- Views: 1358
How to get for cacheddataset oldvalue from specific row?
I want indicate in a dbgrid edited and inserted values with red color. 1) I created this function http://zeoslib.sourceforge.net/viewtopic.php?f=40&t=80907&p=102892#p102892 . It is working good, except the user changes sorting client side. (User clicks on column title and programm adds to zq...
- 17.09.2018, 21:51
- Forum: ZeosLib 7.2 Forum
- Topic: Is TField.OldValue not supported for cachedupdates?
- Replies: 3
- Views: 898
Re: Is TField.OldValue not supported for cachedupdates?
If someone interested I found better way. Add this to ZDbcCachedResultSet.pas: function TZAbstractCachedResultSet.GetOldValAsString(ARecNo, AColumnIndex: Integer; var AIsNull: Boolean): String; //20180917 soner for oldvalue var aIndex: Integer; aOldRowAccessor: TZRowAccessor; begin CheckClosed; if (...
- 17.09.2018, 20:55
- Forum: ZeosLib 7.2 Forum
- Topic: Is TField.OldValue not supported for cachedupdates?
- Replies: 3
- Views: 898
Re: Is TField.OldValue not supported for cachedupdates?
I think I found one bug and the reason for incorrect oldvalues. Look my comments in this code.: // from ZDbcCachedResultSet.pas procedure TZAbstractCachedResultSet.MoveToInitialRow; var Index: Integer; begin CheckClosed; if (RowNo >= 1) and (RowNo <= LastRowNo) and (FSelectedRow <> nil) then begin I...
- 17.09.2018, 14:57
- Forum: ZeosLib 7.2 Forum
- Topic: Is TField.OldValue not supported for cachedupdates?
- Replies: 3
- Views: 898
Re: Is TField.OldValue not supported for cachedupdates?
Or I don't really need the old value. Is there any way to detect if the field is changed for chachedupdates?
I want indicate changed values in TDBGrid.
I want indicate changed values in TDBGrid.
- 17.09.2018, 14:43
- Forum: ZeosLib 7.2 Forum
- Topic: Is TField.OldValue not supported for cachedupdates?
- Replies: 3
- Views: 898
Is TField.OldValue not supported for cachedupdates?
When I set TZQuery.CachedUpdates to true then TField.OldValue returns incorrect values. Is it not supported for cachedupdates?
I use Lazarus 1.8.5 fpc 3.0.4. and sqlite
Same result with Turbo Delphi and Firebird-DB.
I put one example for lazarus and one for turbo delphi.
I use Lazarus 1.8.5 fpc 3.0.4. and sqlite
Same result with Turbo Delphi and Firebird-DB.
I put one example for lazarus and one for turbo delphi.
- 21.08.2018, 12:02
- Forum: ZeosLib 7.2 Forum
- Topic: How can I check if connection is active?
- Replies: 7
- Views: 2609
Re: How can I check if connection is active?
This problem is resolved with version 7.2.4. If someone wants to check if firebird-server is available then use ping-funcktion like this: if ZConnection1.Ping then Writeln('Connection exists'); //ZConnection1.Connected is true, even when connection lost. (Only tested with Firebird 2.5, Windows)
- 21.08.2018, 11:47
- Forum: ZeosLib 7.2 Forum
- Topic: (RESOLVED)Where is the function for changed field?
- Replies: 2
- Views: 1204
Re: (RESOLVED)Where is the function for changed field?
No thanks. I updated my zeos to version 7.2.4 now and I saw you took the code from above in the library. Your are great boys, thanks.
Sorry for late answer.
Sorry for late answer.
- 26.02.2018, 18:32
- Forum: ZeosLib 7.2 Forum
- Topic: (RESOLVED)Where is the function for changed field?
- Replies: 2
- Views: 1204
(RESOLVED)Where is the function for changed field?
Hello, I am using cachedupdates with TZQuery. I have in my query one fkinternalcalc-Field and I am using this as variable for one data row. I had to change some code to take values for fkinternalcalc-Fields like this: // Don't take it now to ZEOS-Library it must be tested, // maybe can cause problem...
- 28.09.2017, 12:21
- Forum: ZeosLib 7.2 Forum
- Topic: How can I check if connection is active?
- Replies: 7
- Views: 2609
How can I check if connection is active?
Hello, in my program I have active TZConnection with Firebird datebase, then I connect with TFBAdmin to the Database server to change password from other user. When I do this TZConnection looses the connection, but the program does not know about it, ZConnection1.Connected is true and ZConnection1.P...
- 19.06.2017, 17:35
- Forum: ZeosLib 7.2 Forum
- Topic: Size of strings again
- Replies: 2
- Views: 493
Re: Size of strings again
Thanks for the explanation.
Now I chose third way, I read the charakter lenth once then set in in controls (i.e. TDBEdit.MaxLength).
Best wishes.
Now I chose third way, I read the charakter lenth once then set in in controls (i.e. TDBEdit.MaxLength).
Best wishes.
- 16.06.2017, 20:21
- Forum: ZeosLib 7.2 Forum
- Topic: Size of strings again
- Replies: 2
- Views: 493
Size of strings again
Hello, first I read this: http://zeoslib.sourceforge.net/viewtopic.php?t=3595 I think TField.Size can be used for character length. TField.DataSize can be used for needed bytes to save. Here is informations from emba and fpc. http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdat...
- 12.02.2017, 17:09
- Forum: ZeosLib 7.2 Forum
- Topic: Calling of UpdatesPending at DoBeforeClose causes Error
- Replies: 1
- Views: 338
Calling of UpdatesPending at DoBeforeClose causes Error
Hello, Calling of TZQuery.UpdatesPending at TZQuery.DoBeforeClose causes Error(listindex-error), here is the solution: ZDbcCachedResultSet.pas function TZAbstractCachedResultSet.IsPendingUpdates: Boolean; begin Result := Assigned(FInitialRowsList) and (FInitialRowsList.Count > 0); //Original: Result...