StrataFrame Forum

Problem Delete rows using stored procedure

http://forum.strataframe.net/Topic25332.aspx

By Douglas Hernandez - 12/6/2009

Hi



I created a stored procedure called Tablebo1_Delete for my business object

I set my business object on the following properties:

DeleteUsingStoreProcedure = true,

DeleteConcurrencyType = OptimisticTimestamp,

RowVersionOrTimestampColumn = version (timestamp column on database table)



My business object Tablebo1.DeleteCurrentRow () delete the row of the grid but not in the database



I hope for any advice
By Edhy Rijo - 12/6/2009

Hi Pedro,



Do a search in the forum using the word "Concurrency" and you will find plenty information about this.



Here is one link I found: http://forum.strataframe.net/FindPost21300.aspx



Also check the CRUD section in the help file.
By Douglas Hernandez - 12/6/2009

I have tried in various ways, such single stored procedure to delete by primary key and not my business to use the stored procedure
By Peter Jones - 12/6/2009

Hi Douglas,



FWIW: When we first started using StrataFrame I was very interested in the pros and cons of using stored procedures from an efficiency point of voew. We have an industrial application that is adding new transactions at about 30 per minutes, 12 hours a day and our main transaction table contains around 11 million rows. While we use stored procedures for all work to do with populating BO's we just leave the CRUD to StrataFrame (i.e. we don't use procs for deleting, inserting etc). We came to this decision after extensive testing that showed there was no performance advantage in using procs.



We found it was very much easier to leave SF to do the heavy lifting in this area.



Cheers, Peter


By Les Pinter - 12/7/2009

Dear Douglas,

   I created a SQL database called Pinter (my favorite name for testing) with a Contacts table and stored procedures to add, edit and delete records. The script file called "CreatePinterDatabaseTablesAndProcs.sql" in the attached ZIP that will create the database, table and procedures and insert four records for testing.

   I then wrote the little application included in the ZIP file. It uses stored procedures to add, edit and delete records, and all three functions work as advertised. Took about three minutes to write.

   If you'll zip up your application and send it to me, I'll take a look at it. Please include generated scripts for the stored procedures for your table.

Les

By Douglas Hernandez - 12/7/2009

Hi Les



I will review the zip file and then report the results



Thanks for the support



Greetings