Subject Righ way of doing that ?
Author Mr. John
Hi to all !
I develop an application based on stock management,I use VB .Net 2005 with FB.I also need to keep a stock table based on I/O in month (a table) and stock from last month (another table). I'm looking for the right way to do it.I'm new with FB, the solved way for me is using some .Net datasets (this is based on load needed data from server in memory, manage and then send to database for updating. ),but I think it's not the right way,it is also very slow.I thing it may be another way based only on firebird/stored procedure.

I/O table : id,price1,price2,quantity,i_o,type
Stock table id,price1,price2,last_quantity,input,output,type

Things are like this : for each record in I/O table I have to :
1.
if type = 1
search in stock for id,price1,price2,type
if type = 2
search in stock for id,price1 ,type
if type = 3
search in stock for id, ,price2,type
if type = 4

search in stock for id, ,type



2. if not found insert it also update-it this way
if i_o="O"
input=input+quantity
else
output=output+quantity
endif
I have no ideea how to do this with FB, I need also some advices how to define stock keys

Thanks for any advice.










____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222

[Non-text portions of this message have been removed]