Article View: borland.public.interbase.sql
Article #644Re: Trigger
From: Karol Bieniaszewski
Date: Mon, 15 Oct 2007 06:48
Date: Mon, 15 Oct 2007 06:48
34 lines
1929 bytes
1929 bytes
U�ytkownik "Alain" <alainbastien@gmail.com> napisa� w wiadomo�ci
news:4710b6d0@newsgroups.borland.com...
> // store in database incoming messages
> //---
>
>
> and then in the Store Procedure AfterInsert
>
> void __fastcall TForm1::Add_messageAfterInsert(TDataSet *DataSet)
> {
> WinExec("c:\\windows\\system32\\calc.exe",1);
> }
> //---------------------------------------------------------------------------
>
> Just to show up the calculator !!
>
> it doesn't work
>
what is the problem to do this like:
Database1->StartTransaction();
Add_message->Prepare();
Add_message->Params->Items[0]->AsString=aSms->Phone;
Add_message->Params->Items[1]->AsDateTime=aSms->DateTime;
Add_message->Params->Items[2]->AsString=aSms->Text;
Add_message->ExecProc();
Database1->Commit();
WinExec("c:\\windows\\system32\\calc.exe",1);
Karol Bieniaszewski
Technical Details
Message-ID:
<47130be6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47107366@newsgroups.borland.com> <47107d2d$1@newsgroups.borland.com> <471082b0@newsgroups.borland.com> <4710ab07$1@newsgroups.borland.com> <4710b6d0@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,6419961b300d2047 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII From: "Karol Bieniaszewski" <liviuslivius@poczta.onet.pl> Newsgroups: borland.public.interbase.sql References: <47107366@newsgroups.borland.com> <47107d2d$1@newsgroups.borland.com> <471082b0@newsgroups.borland.com> <4710ab07$1@newsgroups.borland.com> <4710b6d0@newsgroups.borland.com> Subject: Re: Trigger Date: Mon, 15 Oct 2007 08:48:35 +0200 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 195.205.151.58 Message-ID: <47130be6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1192430566 195.205.151.58 (14 Oct 2007 23:42:46 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail