I don't know if this works the same with other database types, but
with tmemdataset, if you use database.clear(false) to clear the table
without definitions, then database.open, the first time you try to
append a record to the newly cleared dataset, it'll fail- but only if
you have something strings added to the combo box's items field.
process:
create form
add tdatasource and tmemdataset, set the datasource to point to the dataset.
add tdbcombobox
add button
put
memdataset1.FieldDefs.add('name',ftString,50,false);
memdataset1.FieldDefs.Add('age',ftInteger,0,false);
memdataset1.CreateTable;
memdataset1.Open;
dbcombobox1.Items.Add('Red');
dbcombobox1.Items.Add('Green');
dbcombobox1.Items.Add('Blue');
memdataset1.Append;
memdataset1.Fields[0].AsString:='Red';
memdataset1.Fields[1].AsInteger:=1;
memdataset1.Post;
memdataset1.Append;
memdataset1.Fields[0].AsString:='Green';
memdataset1.Fields[1].AsInteger:=2;
memdataset1.Post;
in form create
put memdataset1.Clear(false);
memdataset1.Open;
memdataset1.Append;
memdataset1.Fields[0].AsString:='Blue';
memdataset1.Fields[1].AsInteger:=4;
memdataset1.Post;
memdataset1.Append;
memdataset1.Fields[0].AsString:='Red';
memdataset1.Fields[1].AsInteger:=1;
memdataset1.Post;
in button click
click the button about twice. the form will crash with
Project raised exception class 'MD5Error' with message Bookmark 0 not found
it doesn't seem to do this with any of the other data controls I
actually use, or under Windows at all.
this is both with 0.9.18 and SVN from tonight
After trying to figure this out for a night, my application handles more
or less everything that might crash it much better, but this error is
still getting raised.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives