Update a Value From TEdit

From: Bob Pawley <rjpawley(at)shaw(dot)ca>
To: Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Update a Value From TEdit
Date: 2007-04-13 18:05:49
Message-ID: 00d001c77df6$5e124170$8e904618@owner
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am attempting to update a table using a value that is displayed on a TEdit component. I am getting an access violation error.

Can someone tell me what I am doing wrong??

procedure TLoopBuilderForm.NewLoopButtonClick(Sender: TObject);

var Edit1 : TEdit ;

begin

PSQLQuery1.Close;{close the query}
//assign new SQL expression Monitor
PSQLQuery1.SQL.Clear;
PSQLQuery1.SQL.Add ('Update P_ID.Loops');
PSQLQuery1.SQL.Add ('Set IDW_Loop_ID = + LoopNumberEdit');
PSQLQuery1.SQL.Add ('Where P_ID.Loops.Loop_Name = :Loop_Name');
PSQLQuery1.ParamByName('LoopNumberEdit').Value := Edit1.Text;
PSQLQuery1.Execsql;

end;

Running Delphi 6 and PostgreSQL 8.2 on Win XP.

Bob

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2007-04-13 18:23:25 OT: schema-sketching software
Previous Message steve shiflett 2007-04-13 17:46:53 Cursor Contents display in pgAdmin - Help.