Reputation: 2029
I execute an insert, with TSQLQuery in Delphi. The data inserts perrfect, but the programm shows an error with the title message. Any ideas ?. Here is my code:
With DMConnect.qryCrearProyecto do begin
ParamByName('cliente').AsString := Self.Edit2.Text;
ParamByName('obra').AsString := Self.Edit3.Text;
ParamByName('ubicacion').AsString := Self.Edit4.Text;
ParamByName('nroEstudio').AsInteger := StrToInt(Self.Edit5.Text);
ParamByName('sondeo').AsInteger := StrToInt(Self.Edit6.Text);
ParamByName('nivelFreatico').AsFloat := StrToFloat(Self.Edit7.Text);
Open;
Close;
end;
Upvotes: 0
Views: 3321
Reputation: 1007
I don't know how strict TSQLQuery is, but typically you should not use the Open method to SQL statement, which does not returns data (this is that cursor). You should call ExecSql instead.
Upvotes: 6