Hello guys,
 
Here I am giving some of my tables and its main fields.
 
ItemMaster
-----------------
ItemCode
CurrentStock
 
 
PurchaseDetail
------------------------
ItemCode
PurchaseQty
 
StockLedger
-----------------------
ItemCode
TransactionType (Sale,Purchase,etc)
Qty
 
When I make a purchase transaction, I will insert the records to purchaseDetail table through VB(frontend). In that time one trigger should work to insert corresponding records to Stockledger and in the same time it should add that much qty to CurrentStock in ItemMaster. If there is any updation or deletion takeplace in PurchaseDetail table, it should project on these two tables also. Pls tell me how can I write the triggers in SQL Server. I am using SQL Server as a backend for the last one year, but I did not used these areas.
 
SQL Stored procedure.
 
I have to write a stored procedure, that should generate max value of a record from a table. I have to pass the table name, fieldname(Max value field) and condition part(if there is) as  parameters through vb program. Pls tell me
1.how can I write stored procedure
2.how can I call it from VB and pass the parameters
3.How can I receive the returned value from the procedure.
 
Thanks in advance
 
Akaash


Yahoo! for Good - Make a difference this year.


Please zip all files prior to uploading to Files section.




YAHOO! GROUPS LINKS




Reply via email to