Subject | RE: [firebird-support] Re: Creating a stored procedure in a Delphi application |
---|---|
Author | Clay Shannon |
Post date | 2005-03-03T20:08:29Z |
Luis,
<< P.D. I like Cervantes very much, I have read El Quijote twice, but I
think this year I will be tired about that all time in the media.
Tonight the king of Spain begins the going on and on, reading the
first ten lines of the Quijote. Great effort!>>
I wrote a novel that is somewhat like an American version of Don Quixote. I
can't imagine Bush reading from it, though--especially in public.
Clay Shannon,
Dimension 4 Software
-----Original Message-----
From: lmmolinerocasares [mailto:soporte@...]
Sent: Thursday, March 03, 2005 1:35 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Creating a stored procedure in a Delphi
application
Clay
You are right about the possible diferences between Interbase and
Firebird, but until now I had no problems with IBX, so I will
investigate, and then maybe I should buy FIB+ which I know and think
is a really good product.
Thanks
Luis Miguel
P.D. I like Cervantes very much, I have read El Quijote twice, but I
think this year I will be tired about that all time in the media.
Tonight the king of Spain begins the going on and on, reading the
first ten lines of the Quijote. Great effort!
--- In firebird-support@yahoogroups.com, "Clay Shannon"
<cshannon@d...> wrote:
<< P.D. I like Cervantes very much, I have read El Quijote twice, but I
think this year I will be tired about that all time in the media.
Tonight the king of Spain begins the going on and on, reading the
first ten lines of the Quijote. Great effort!>>
I wrote a novel that is somewhat like an American version of Don Quixote. I
can't imagine Bush reading from it, though--especially in public.
Clay Shannon,
Dimension 4 Software
-----Original Message-----
From: lmmolinerocasares [mailto:soporte@...]
Sent: Thursday, March 03, 2005 1:35 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Creating a stored procedure in a Delphi
application
Clay
You are right about the possible diferences between Interbase and
Firebird, but until now I had no problems with IBX, so I will
investigate, and then maybe I should buy FIB+ which I know and think
is a really good product.
Thanks
Luis Miguel
P.D. I like Cervantes very much, I have read El Quijote twice, but I
think this year I will be tired about that all time in the media.
Tonight the king of Spain begins the going on and on, reading the
first ten lines of the Quijote. Great effort!
--- In firebird-support@yahoogroups.com, "Clay Shannon"
<cshannon@d...> wrote:
> Luis,expression
>
> I use FIB+ components with Delphi:
>
> http://www.devrace.com/en/fibplus/index.php
>
> IBeXpress is good for Delphi and IB, but "going forward," as the
> goes, IB and FB are diverging like the proverbial path in the woods.The one
> you take may make "all the difference" (apologies to Frost) as to whicheverything
> components you should use.
>
> Personally, I create the stored procedures using Database Workbench:
>
> http://www.upscene.com/
>
> (DB WB is an awesome product that makes creating StoredProcs and
> else practically "child's play.")GetLastError,
>
> and then use the TpFIBStoredProc component like this:
>
> var
> sp: TpFIBStoredProc;
> trans: TpFIBTransaction;
> begin
> sp := TpFIBStoredProc.Create(nil);
> try
> trans := TpFIBTransaction.Create(nil);
> try
> sp.Database := dm.FIBDB;
> sp.Transaction := trans;
> trans.DefaultDatabase := dm.FIBDB;
> trans.Active := True;
> sp.StoredProcName := 'P_UPDATE_PHYSICIAN';
> sp.ParamByName('FIRSTNAME').AsString := AFirstName;
> sp.ParamByName('LASTNAME').AsString := ALastName;
> sp.ParamByName('ADDRESS1').AsString := AAddress1;
> sp.ParamByName('ADDRESS2').AsString := AAddress2;
> sp.ParamByName('CITY').AsString := ACity;
> sp.ParamByName('STATE').AsString := AState;
> sp.ParamByName('ZIP').AsString := AZip;
> sp.ParamByName('PHONE1').AsString := APhone1;
> sp.ParamByName('PHONE2').AsString := APhone2;
> sp.ParamByName('PHYSICIAN_ID').AsInteger := APhysID;
> try
> sp.ExecProc;
> trans.Commit;
> except
> on e: Exception do begin
> InsertExceptionData(Application.ExeName, Application.Title,
> e.ClassName, e.Message,
> SysErrorMessage(GetLastError),
> TPFIBDatabase(sp.Database));Yahoo! Groups Links
> trans.Rollback;
> end;
> end;
> finally
> trans.Free;
> end;
> finally
> sp.Free;
> end;
> end;
>
> << Las Rozas - Madrid (Spain)>>
> Tell Miguel Cervantes "hi" for me the next time you see him.
>
> Clay Shannon,
> Dimension 4 Software
>
> -----Original Message-----
> From: lmmolinerocasares [mailto:soporte@a...]
> Sent: Thursday, March 03, 2005 11:29 AM
> To: firebird-support@yahoogroups.com
> Subject: [firebird-support] Creating a stored procedure in a Delphi
> application
>
>
>
> In a Delphi application I need to update some of the objects of a
> database in the client location, I use the standar IBExpress Delphi
> component TIBSQL, I assign the SQL property with the command, call
> ExecQuery, and everything is almost fine. I can add new columns to an
> existing table, I can create new tables, new foreing keys, new
> indexes, etc.
> But I can't create a new stored procedure. If I include the SET TERM
> statement I got an error message 'TERM token unknown', and of course
> if I do not include the statement I got an error -104.
>
> Does anyone know how can I create a new stored procedure in Delphi?
> Which component should I use?
>
> Luis Miguel Molinero
> Las Rozas - Madrid (Spain)
>
>
>
>
>
>
> Yahoo! Groups Links