exception class : EAssertionFailed
exception message : Assertion failure (D:\Projects\Delphi\Dac\Common\Source\MemData.pas, line 2880).
main thread ($7e0):
0071cdde +016a PEANUTS.exe MemData TData.GetFieldData
0079da06 +01ba PEANUTS.exe CRAccess TCRRecordSet.GetFieldData
0071d03c +00c4 PEANUTS.exe MemData TData.GetField
00735287 +007f PEANUTS.exe MemDS TMemDataSet.GetFieldData
0073507b +0013 PEANUTS.exe MemDS TMemDataSet.GetFieldData
006f6894 +0038 PEANUTS.exe Data.DB 13030 +2 TDataSet.GetFieldData
00735099 +0011 PEANUTS.exe MemDS TMemDataSet.GetFieldData
006e4301 +00a1 PEANUTS.exe Data.DB 5025 +9 TField.GetData
006e6ca3 +007f PEANUTS.exe Data.DB 6147 +5 TWideStringField.GetValue
006e6b36 +001e PEANUTS.exe Data.DB 6124 +1 TWideStringField.GetAsVariant
00a6a1bc +00b4 PEANUTS.exe newutils2 1456 +15 Updt
The actual routine which allows me to move values between datasets based on the field names.
The source is a tmsquery and the destination is a dbisam table. This only happens in direct mode. If I change to prauto (which will be oledb) it works fine.
Here is the actual routine:
Procedure Updt(Sr, ds: TDataSet);
Var
wsd: AnsiString;
Values: VARIANT;
Names: Tstrings;
iFields, iField, ifield2: integer;
itable, otable: TDataSet;
rr: integer;
Begin
Names := TStringlist.Create;
itable := TDataSet(Sr);
otable := TDataSet(ds);
otable.disablecontrols;
itable.disablecontrols;
otable.edit;
With itable Do
Begin
iFields := FieldCount - 1;
Values := VarArrayCreate([0, iFields], varVariant);
itable.GetFieldNames(Names);
For iField := 0 To iFields Do
Begin
Values[iField] := Fields[iField].Value; //<- This is where the exception occurs
End;
ifield2 := 0;
For iField := 0 To iFields Do
Begin
Try
If otable.FindField(Names[iField]) <> Nil Then
If otable.FieldByName(Names[iField]).canmodify = true Then
otable.FieldByName(Names[iField]).Value := Values[iField];
Except
End;
End;
End;
otable.post;
otable.enablecontrols;
itable.enablecontrols;
Names.Free;
End;
Assertion failure with sdac 7.01 in direct mode
Re: Assertion failure with sdac 7.01 in direct mode
Thank you for the information. We have reproduced the problem and investigation is in progress. We will inform you when we have any results.
Re: Assertion failure with sdac 7.01 in direct mode
I have a similar problem. Any string from the database that happens to be empty causes this assertion error when trying to read it. This occurs in the SQL editor as well
I hope that a quick solution can be found. I am happy to send sample code and any other details to help track down the problem. I purchased the product with source code only two days ago. Looking at the source code I can see that some kind of trap needs to go in to stop converting nothing to pointers
Thanks
N. Thoresen
Software Integration and Design
Brisbane Australia
I hope that a quick solution can be found. I am happy to send sample code and any other details to help track down the problem. I purchased the product with source code only two days ago. Looking at the source code I can see that some kind of trap needs to go in to stop converting nothing to pointers
Thanks
N. Thoresen
Software Integration and Design
Brisbane Australia
Re: Assertion failure with sdac 7.01 in direct mode
Fixing of this bug is in progress. This fix will be included into the next SDAC build. The next SDAC build will be released within 1 month.