From: | "Arthur Hoogervorst" <arthur(dot)hoogervorst(at)gmail(dot)com> |
---|---|
To: | "Bob Pawley" <rjpawley(at)shaw(dot)ca> |
Cc: | Postgresql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Update a Value From TEdit |
Date: | 2007-04-13 18:46:29 |
Message-ID: | ff60f9b30704131146i372f6bedne53b6c7e6fc8fb74@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi:
What's the point of declaring the TEdit locally? Use a string
instead. Additionally, in Delphi [and any other OOP language) if you
want to use objects, you instantiate them first, as in Edit1 :=
TEdit.Create(nil);
Regards,
Arthur
On 4/13/07, Bob Pawley <rjpawley(at)shaw(dot)ca> wrote:
>
>
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jon Sime | 2007-04-13 20:00:48 | Re: OT: schema-sketching software |
Previous Message | Raymond O'Donnell | 2007-04-13 18:33:25 | Re: Update a Value From TEdit |