Subject | Re: [firebird-support] [RE: firebird-support] average cost price - using SP's |
---|---|
Author | Peter Sanders |
Post date | 2004-11-23T14:32:32Z |
Hi Maya
On Tue, 23 Nov 2004 08:34:41 +0200, Maya McLeod <maya@...>
wrote:
better than Flashfiler.
mor familiar with FB. I have seen an d/l IBObjects. After an initial
surprise at the number of components and wondering where to begin, I did
try it out. IBOjects AFAICS will be the way to go - but I prefer to be a
little more familiar with FB before I commit to IBO. After becomming more
conversant with FB I may then see something more "in tune" with my needs.
the personal edition.
I guess it is just a matter of understanding the syntax and language
keywords etc. This will come with a little (LOT?) of practice.
to wait a little while yet - while I practice :D
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
On Tue, 23 Nov 2004 08:34:41 +0200, Maya McLeod <maya@...>
wrote:
>>> Delphi and a database called Flashfiler (a record based C/S DB).Flashfiler is much better than Paradox, much like I guess FB is much
>
> We use Delphi too - except we used to use paradox. I could NEVER go back
> now!
better than Flashfiler.
>>> I have a lot to learn about FBConcidentally I just contacted a local bookstore about that very book.
>
> Do yourself a favour and get Helen's book (The Firebird Book) if you
> haven't already. It will save you many hours of your time, not to
> mention headaches.
> I would be interested to know what Delphi components you decided to useInitially I will use Delphi's IBX components. This will get me started and
> for accessing FB.
mor familiar with FB. I have seen an d/l IBObjects. After an initial
surprise at the number of components and wondering where to begin, I did
try it out. IBOjects AFAICS will be the way to go - but I prefer to be a
little more familiar with FB before I commit to IBO. After becomming more
conversant with FB I may then see something more "in tune" with my needs.
> SP's can be used for many things. Only your imagination is your limit ;-)[...]
> I started off using selectable SP's much as one would use a view, and
> then just extended things from there.
> So as you can see, asking "what can you do with stored procedures?" is aYes :D
> bit like asking "what can you do with C++?" - OK, maybe not quite as
> powerful as C or Delphi, etc, but you get the picture?
> I use stored procedures as a base for all my reports.Yes, I came across IBExpert and was VERY impressed with the abilities of
> Totals are not stored, but calculated as needed (if you get your indices
> right, then speed is not a problem) No need for 'rebuilds' to correct
> total field that have gone out of synche.
>
> If you are going to write SP's then, I recommend you use a tool such as
> IBExpert to do this. Yes, it is possible to write them in Notepad, but
> try IBExpert (Personal Ed is free), and you'll see what I'm talking
> about. There is code-completion, sysntax highlighting, compiling, etc -
> all of those niceties that us Delphi programmers are used to.
the personal edition.
> Below is a sample procedure:[...]
> I probably shouldn't be calling exit's (like you shouldn't in delphi[...]
> either...)
>
> ------------------------------------------------------------------
>
> CREATE PROCEDURE CALC_STOCK_FIFO_COST (
> ISTOCKCODE VARCHAR(30) CHARACTER SET NONE,
> IWAREHOUSECODE VARCHAR(4) CHARACTER SET NONE,
> ITODATE TIMESTAMP)
> RETURNS (
> OLEVEL DECIMAL(18,5),
> OEXTCOST DECIMAL(18,5))
> AS
> DECLARE VARIABLE LLEVEL DECIMAL(18,5);
> DECLARE VARIABLE LCOSTPRICE DECIMAL(18,5);
> DECLARE VARIABLE LCOSTPRICEPER DECIMAL(18,5);
> DECLARE VARIABLE LQTY DECIMAL(18,5);
> begin
> ------------------------------------------------------------------Yes :d
> OK, OK, that one might scare you away for life:
> Here is the simplest one I could find:[...]
>
> (This is probably the kind of thing you would start off with)
>
> ------------------------------------------------------------------
> CREATE PROCEDURE LIST_UOM_USED
> RETURNS (
> OUOM VARCHAR(5) CHARACTER SET NONE)
> AS
> endBetter :D
> end
I guess it is just a matter of understanding the syntax and language
keywords etc. This will come with a little (LOT?) of practice.
> ------------------------------------------------------------------Yes, that's a good point.
>
> NB. You'll probably be able to convert you app without touching SP's (as
> you never had them before)
> but as you develop, and enhance stuff, you'll find more and more use forYes, it does. I wish I could just make the change now. However I will have
> them.
>
> Hope this helps.
to wait a little while yet - while I practice :D
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/