That's great, thank you Luiz: works a treat! TDbf is such a nice lightweight solution for incorporating database functionality into monolithic applications and it's still relevant even though it appears that development stopped years ago.
2008/11/30 Luiz Americo Pereira Camara <[EMAIL PROTECTED]>: > Dave Coventry escreveu: >> Does anyone have experience of TDbf? >> >> I want to change an existing record: >> >> ival:=strtoint(ConFigs.Values['hubID']); >> Dbf1.Open; >> while not(Dbf1.EOF)do >> begin >> if Dbf1.FieldByName('hubID').AsInteger=ival then >> begin >> > Add "Dbf1.Edit;" here >> Dbf1.FieldByName('Loc').AsString:=Configs.Values['Location']; >> Dbf1.FieldByName('EstName').AsString:=Configs.Values['Establishment']; >> Dbf1.FieldByName('NetwkName').AsString:=NetwkName; >> Dbf1.FieldByName('VATNo').AsString:=Configs.Values['VATNumber']; >> Dbf1.FieldByName('TelNo').AsString:=Configs.Values['TelNumber']; >> Dbf1.FieldByName('User').AsString:=username; >> Dbf1.Post; >> end; >> Dbf1.Next; >> end; >> >> Obviously ival has the value of the 'hubID' field of the record that I >> want to update and I'd like to replace all the fields in the record >> with new values. >> >> However, I'm getting an error which says: "Project raised exception >> class 'Unknown' " >> _______________________________________________ >> Lazarus mailing list >> Lazarus@lazarus.freepascal.org >> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> >> > > _______________________________________________ > Lazarus mailing list > Lazarus@lazarus.freepascal.org > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus