Subject Re: insert problem
Author Jason Wharton
You cannot call the Open and Insert method when your SQL is changed to a
DELETE statement. Use the ExecuteDML() method like this:

with pro_ do
begin
Close;
ExecuteDML('delete from prospect' {, nil });
open;
insert;
.......................

I can't remember if you will need a ,nil there or not. I think not.

HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "YVON GUINARD" <yvonguinard@...>
To: "Jason Wharton" <jwharton@...>
Sent: Wednesday, November 15, 2000 6:24 PM
Subject: insert problem


> DELPHI 5 (build 6.18) update pack 1
> IBO PARTIALE SOURCES VERSION 3.6 Be
>
> Hello
>
> Thank for you answer today
>
>
>
> I have a new problem :
>
> pro_ is a TIB_QUERY
>
> After insert there is this message :cannot insert a new row.
> Is it cause a bad property of pro_
>
> object pro_: TIB_Query
> DatabaseName = 'eom:d:\actiale\dossier\000004\exp_pro\prospect.gdb'
> IB_Connection = database
> SQL.Strings = (
> 'SELECT *'
> 'FROM PROSPECT')
> ColorScheme = False
> MasterSearchFlags = [msfOpenMasterOnOpen,
msfSearchAppliesToMasterOnly]
> BufferSynchroFlags = []
> FetchWholeRows = True
> Left = 64
> Top = 442
> end
>
>
> Thank you
>
> Yvon Guinard <yvonguinard@...>
>
>
>
>
>
>