๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #937

Insert,Edit,Delete

#937
From: Serra
Date: Sat, 05 May 2007 10:57
22 lines
1672 bytes
IB  6.02,  D7, DSP, SQDS, CDS

SELECT  O.*, C.CUSTNAME FROM ORDERS O
JOIN CUSTOMER C  ON C.CUSTNO=O.CUSTNO

SELECT  OD.*, P.PARTNAME FROM ODETAIL OD
JOIN PARTS P  ON  P.PARTNO=OD.PARTNO
WHERE RNO=:RNO

in Order CDS after post event,  i cant write OrderCDS.ApplyUpdates(0);
(Cause of Customer Name, same in ODETAIL Part Name )
How should i write the datas into database ?  like below ?
SQuery.Sql.Add('INSERT INTO ORDERS (RNO,PROCC,CDATE.....)
VALUES (:RNO, :PROCC, :CDATE....)
SQuery.Params[0].Value:=OrdersCDS.FieldByName('RNO').Value;
SQuery.Params[1].Value:=OrdersCDS.FieldByName('PROCC').Value;
//.... and more 20 fields.....
SQuery.ExecSql;

Or is there any easy&short solu๏ฟฝtion to edit,insert,delete datas
Is there any a simple Orders Application to review sql logic anywhere ?
Thank you.
Technical Details
Message-ID: <463c6322$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,dfa0641d2a2ca4d4,start
X-Google-Attributes: gid114a0e,public
X-Google-Language: ENGLISH,ASCII
From: "Serra" <nomail@nomail.com>
Newsgroups: borland.public.interbase.sql
Subject: Insert,Edit,Delete
Date: Sat, 5 May 2007 13:57:44 +0300
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.214.131.112
Message-ID: <463c6322$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178362658 81.214.131.112 (5 May 2007 03:57:38 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail