Delphi - Como actualizo los datos con tquery?

 
Vista:

Como actualizo los datos con tquery?

Publicado por actualizar datos (50 intervenciones) el 09/03/2010 18:52:38
hago el upadte y no me hace el cambio me sale el error creating cursor HANDLE mi codigo es este
nit Unit5;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Grids, DBGrids, ExtCtrls, DBCtrls, Buttons,
ComCtrls, DBCGrids;

type
TForm5 = class(TForm)
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
Button1: TButton;
Query1: TQuery;
DataSource1: TDataSource;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);

private
{ Private declarations }
public
{ Public declarations }
end;

var
Form5: TForm5;

implementation

uses Unit3;

{$R *.dfm}


procedure TForm5.Button1Click(Sender: TObject);
begin
query1.Close;
query1.SQL.text:='update BLIBROS set AREA= :area,FOLIO= :FOLIO, TITULO = :titulo WHERE ISBN = :ISBN';
query1.Parambyname('area').AsString:=edit1.Text;
query1.Parambyname('FOLIO').AsString:=edit2.text;
QUERY1.ParamBYNAME('titulo').AsString:=edit3.Text;
query1.ParamByName('ISBN').AsString:=edit6.Text;
query1.ExecSQL;
query1.ApplyUpdate;

end;

procedure TForm5.Button2Click(Sender: TObject);
begin
CLOSE;
end;


end.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder