View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003767 | JEDI VCL | 00 JVCL Components | public | 2006-06-19 04:47 | 2008-10-29 06:23 |
Reporter | ZENsan | Assigned To | obones | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | suspended | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003767: TjvDBDatePicker bug - can seriously mix data | ||||
Description | I use JvDBDatePicker to edit date field in my MySQL query. Component is on the other then Query component form (editing form). This form is shown when AfterEdit events fires for TmySQLQuery object. All is ok, until I change field value once to one (19.06.2006) value for example using this JvDBDatePicker. Now I select for example other record and do nothing. After some seconds (30-60) input form is shown and in this field is written value that is equal to Now()! There is no calls to Query.Edit or something else in units which can rise AfterEdit event. And this is shown in call stack.I spent a lot of time to catch this bug. And last i done is - put messageboxes before every frmInvoice.Show line with raise Exception.Create to obtain call stack. JvDatePickerEdit.pas:Line 457:(TJvCustomDatePickerEdit.CalChange) if FPopup is TJvDropCalendar then //Text := DateToText(TJvDropCalendar(FPopup).SelDate); Date := TJvDropCalendar(FPopup).SelDate; by this line is called AfterEdit event of TMySQLQuery component. | ||||
Additional Information | Call stack: [0068B5D7] UfrmInvoices.UfrmInvoices.TfrmInvoices.QInvoicesAfterEdit (Line 913, "UfrmInvoices.pas") [00555CF9] DB.DB.TDataSet.DoAfterEdit (Line 11190, "DB.pas") [00554F5F] DB.DB.TDataSet.Edit (Line 10623, "DB.pas") [0054E2AF] DB.DB.TDataSource.Edit (Line 7879, "DB.pas") [0054DAF9] DB.DB.TDataLink.Edit (Line 7627, "DB.pas") [0058EE64] DBCtrls.DBCtrls.TFieldDataLink.Edit (Line 1575, "dbctrls.pas") [00666588] JvDBDatePickerEdit.JvDBDatePickerEdit.TJvCustomDBDatePickerEdit.EditCanModify (Line 286, "JvDBDatePickerEdit.pas") [0065CF8B] JvDatePickerEdit.JvDatePickerEdit.TJvCustomDatePickerEdit.CalChange (Line 459, "JvDatePickerEdit.pas") [0065AC08] JvCalendar.JvCalendar.TJvCustomMonthCalendar.DoDateSelChange (Line 981, "JvCalendar.pas") [0065B3A5] JvCalendar.JvCalendar.TJvCustomMonthCalendar.CNNotify (Line 1273, "JvCalendar.pas") | ||||
Tags | No tags attached. | ||||
|
May be you need to add one line "FDataLink.Edit;" after EditCanModify... procedure TJvCustomDBDatePickerEdit.SetChecked(const AValue: Boolean); begin if AValue <> Checked then begin if EditCanModify then begin FDataLink.Edit; inherited SetChecked(AValue); end else UpdateDisplay; end; end; And also change EditCanModify function: Result := (not IsLinked) or //FDataLink.Edit; FDataLink.CanModify; |
|
Please provide the zipped sources of a sample application showing this. |
|
I can't provide "simple" example. Program part where it's happens is too difficult. But can you explain when CNNotify(JvCalendar.pas) fires MCN_SELCHANGE: begin if IsBlankDate(PNMSelChange(Msg.NMHdr)^.stSelStart) then Exit; with PNMSelChange(Msg.NMHdr)^.stSelStart do dFrom := Trunc(EncodeDate(wYear, wMonth, wDay)); if IsBlankDate(PNMSelChange(Msg.NMHdr)^.stSelEnd) then dTo := dFrom else with PNMSelChange(Msg.NMHdr)^.stSelEnd do dTo := Trunc(EncodeDate(wYear, wMonth, wDay)); DoDateSelChange(dFrom, dTo);{and there is called FDatalink.Edit which raises dataset to edit..} end; in non-visible form? What may be the possible situations? My query have properties AutoRefresh=False;RequestLive=True; My JvDBDatePickerEdit have properties: AllowNoDate=True;DirectInput=False;TabStop=False;NoDateShortCut=Ctrl+Del Big thanks. |
|
This problem occurs only with fields that can be NULL, and only with records which has NULL value. I have many another forms in application without this problem and with TJvDBDatePickerEdit. I think that because of this NULL some where selected date is not updated and then when CN_NOTIFY fires, ir raises Editing dataset. |
|
Well, without any application showing just this bug, I'm sorry but I won't be able to help. Maybe you could try looking a bit further and find what goes wrong. |
|
Ok I will try when I have free time |
|
I am having the exact same problem with a DBISAM Database. I have 34 instances of this control, and it was quite a surprise to see the fields autofill after I waited a few seconds. I'll be happy to upload the source and binaries for your review. |
|
Maybe we can close this issue? |
|
Unless daboo provides a valid example, then yes. |
2006-10-06 20:13
|
Unit1.pas (1,754 bytes) |
|
Ok, First off. Please disregard and delete the Unit1.pas file I uploaded. I was trying to upload my zip file that is < 5,000k, but will not upload. I'll try to split it in two and I will write some detailed instructions to replicate the issue. |
|
Ok, It will not let me upload my file, so I've put it here: http://dienhart.com/tmp/DTPE_Test.zip I am using DBISAM 4. It is available from elevatesoft.com (should be able to use the demo version if you need to), but you should be able to see from my source, I am using default settings to connect to the db. I have included the execuatable so you can see the issue as I do. Here's what to do... Run Project1.exe Create a new entry using in the database filling in both fields using the DatePickers. Post the new entry. Click the insert record button on the DBNavigator. Select a date in the 1st DatePicker field. tab to the second field Select a date in the 2nd field highlight and delete the date you just selected for the 2nd field. [Shift + Tab] back to the first field Wait... (Unfortunately, I've noticed it takes as little as 10 seconds, but as much as 1 minute for the 2nd field to repopulate. Note: this never happens immediately after you start the application and enter the first entry. It always happens on enries after the 1st. If it does not happen the 1st time, try it again. I've noticed that occasionally, it doesn't surface, but this example does show the problem. Please let me know if I can provide any more feedback. Best Regards, David |
|
Is this still true with the very latest sources from SVN ? |
|
Is this still true with the very latest sources from SVN ? |
|
I got the same problem too (last stable release) Please, correct it! |
|
I also have ecountered the same (or very similiar) problem. Application Im developing uses combined DBgrid lists for quick searching/editing with different database aware controls (mainly DB edits, DB memos and DB DatePickers). DB is MS Access. Having the JvDatePickerEdit on the form results in very weird errors. The symptoms are: - launching an OnCalcFields events in random (usually 1-3 minutes) periods, which results in linked ADODataset component entering Edit state. - when having 2 new records added to the table after OnCalcFields event is passed one of the records will change the value of JvDatePickerEdit to the one stored in another row of the table. Weird things: - only affects newly added rows to the table, after restarting application the previously added records are "safe" I cannot give the sources for the application. But I will try to make a sample app with reproducing this error and attach it later (when will have some free time at work). Right now this error makes this component totally unusable, as it corrupts data. |
|
Anyone care to look for a solution? |
|
Hello? |
|
No news, closing the issue. Please create a new one if this is still present in the latest SVN version. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-06-19 04:47 | ZENsan | New Issue | |
2006-06-19 06:03 | ZENsan | Note Added: 0009601 | |
2006-06-19 06:04 | ZENsan | Note Edited: 0009601 | |
2006-06-19 07:47 | obones | Note Added: 0009605 | |
2006-06-19 07:47 | obones | Status | new => feedback |
2006-06-20 05:53 | ZENsan | Note Added: 0009611 | |
2006-06-20 05:54 | ZENsan | Note Edited: 0009611 | |
2006-06-20 06:01 | ZENsan | Note Edited: 0009611 | |
2006-06-20 08:19 | ZENsan | Note Added: 0009613 | |
2006-06-22 08:06 | obones | Note Added: 0009619 | |
2006-06-22 10:26 | ZENsan | Note Added: 0009623 | |
2006-09-13 18:58 | daboo | Note Added: 0010121 | |
2006-10-05 10:40 | ZENsan | Note Added: 0010292 | |
2006-10-06 02:34 | obones | Note Added: 0010297 | |
2006-10-06 20:13 | daboo | File Added: Unit1.pas | |
2006-10-06 20:33 | daboo | Note Added: 0010327 | |
2006-10-06 20:34 | daboo | Note Edited: 0010327 | |
2006-10-06 21:03 | daboo | Note Added: 0010328 | |
2007-01-04 04:04 | obones | Note Added: 0010522 | |
2007-01-04 04:07 | obones | Note Added: 0010523 | |
2007-05-11 04:24 | Runspect | Note Added: 0012695 | |
2007-09-27 05:25 | Lucius | Note Added: 0013821 | |
2007-10-12 08:57 | obones | Note Added: 0013942 | |
2008-02-21 06:50 | obones | Note Added: 0014252 | |
2008-10-29 06:21 | obones | Status | feedback => resolved |
2008-10-29 06:21 | obones | Resolution | open => suspended |
2008-10-29 06:21 | obones | Assigned To | => obones |
2008-10-29 06:21 | obones | Note Added: 0014929 |