Forum > Databases

TDBF

<< < (2/2)

matthijs:
Could you post some relevant pieces of code, so we could have a look? If we continue like this we have to keep guessing and that usually is no good at all. :)

Anonymous:
Okey in the DataModule I declare:
...
    TSinInfo: TDbf;
    TSinInfoEMPRESA: TStringField;
    TSinInfoRUTA: TStringField;
...
where TSIninfo is my table and TSinInfoEMPRESA,TSinInfoRUTA  are the fields in my table. When I open the table in another unit, I do:
...
  ruta :=ExtractFilePath(ParamStr(0));
   DM.TSInInfo.FilepathFull := ruta;
   DM.TSinInfo.Tablename := 'SinInfo.dbf';
   DM.TSinInfo.Exclusive := True;
   DM.TSInInfo.Open;
....

It is Ok, but the the project crash when I do
...
    DM.TSInInfo.Insert;
    DM.TSInInfoEmpresa.Value := ENombre.Text;
...
Just in the line DM.TSInInfoEmpresa.Value := ENombre.Text; I get the error message:  "PROJECT MYPROJECT RAISED EXCEPTION CLASS 'EXTERNAL: SIGSEGV'".  I hope that somebody can help me. Thank



P.D.: Sorry about my english

Anonymous:
I knok what's wrong, I should use

TDbf1.FieldByName('MyField').AsString := 'Whatever';

Instead Of

DM.TSInInfoEmpresa.Value

Navigation

[0] Message Index

[*] Previous page

Go to full version