Board index » delphi » JOIN SQL, autoSQL and Delete record from this JOIN SQL

JOIN SQL, autoSQL and Delete record from this JOIN SQL

I have written a SQL text into a ADOQuery:

select A.*, B.* from A
left outer join B on A.ID = B.ID

ADO can create updating, deleting and inserting SQL automatic of this
ADOQuery.
But I want to write these SQL self, How should I do?
When I use ADOQuery.Delete, it deletes two records from table A and table B,
I need only delete the record from table A, save the record in the table B,
how
to do?
I set those fields in the A to:
Field.ProviderFlag := [pfInWhere, pfUpdate];
set those fields in the B to:
Field.ProviderFlag := [];
But it is not worked.

Thank u very much.

william
Sorry for my bad English

 

Re:JOIN SQL, autoSQL and Delete record from this JOIN SQL


USe
MyADOQuery.RecordSet.Properties['Unique Table'].Value :=
  'The Name of the table you want to restrict updates to' ;

Quote
Zhu Huaiyang wrote:
> I have written a SQL text into a ADOQuery:

> select A.*, B.* from A
> left outer join B on A.ID = B.ID

> ADO can create updating, deleting and inserting SQL automatic of this
> ADOQuery.
> But I want to write these SQL self, How should I do?
> When I use ADOQuery.Delete, it deletes two records from table A and table B,
> I need only delete the record from table A, save the record in the table B,
> how
> to do?
> I set those fields in the A to:
> Field.ProviderFlag := [pfInWhere, pfUpdate];
> set those fields in the B to:
> Field.ProviderFlag := [];
> But it is not worked.

> Thank u very much.

> william
> Sorry for my bad English

--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
www.GrupoMillennium.com

Re:JOIN SQL, autoSQL and Delete record from this JOIN SQL


Thank u very much.
I will try it

"Guillermo Casta?o A" <Guiller...@GrupoMillennium.com>
wrote:3C1DEC85.3B43E...@GrupoMillennium.com...

Quote
> USe
> MyADOQuery.RecordSet.Properties['Unique Table'].Value :=
>   'The Name of the table you want to restrict updates to' ;

> Zhu Huaiyang wrote:

> > I have written a SQL text into a ADOQuery:

> > select A.*, B.* from A
> > left outer join B on A.ID = B.ID

> > ADO can create updating, deleting and inserting SQL automatic of this
> > ADOQuery.
> > But I want to write these SQL self, How should I do?
> > When I use ADOQuery.Delete, it deletes two records from table A and
table B,
> > I need only delete the record from table A, save the record in the table
B,
> > how
> > to do?
> > I set those fields in the A to:
> > Field.ProviderFlag := [pfInWhere, pfUpdate];
> > set those fields in the B to:
> > Field.ProviderFlag := [];
> > But it is not worked.

> > Thank u very much.

> > william
> > Sorry for my bad English

> --
> Guillermo Casta?o Acevedo
> Gerente de Sistemas - Grupo Millennium Ltda
> Guiller...@GrupoMillennium.com
> www.GrupoMillennium.com

Other Threads