I need to create a stored procedure in a Pervasive database. I presume that I can do this using PCC. I have never used stored procedures in any database before so this is a new venture.
I need to use stored procedures as I need to be able to rollback a number of sql statements if any of them fail. My question is basically this. My procedure will have quite a few sql statements and there will be at least one statement that could have to be executed several times with different data - so, can i pass an array of data to a stored procedure and use that to execute the same procedure a number of times by looping through the array?
Also, how to I check if an sql statement fails during a stored procedure?
Mighty
I need to use stored procedures as I need to be able to rollback a number of sql statements if any of them fail. My question is basically this. My procedure will have quite a few sql statements and there will be at least one statement that could have to be executed several times with different data - so, can i pass an array of data to a stored procedure and use that to execute the same procedure a number of times by looping through the array?
Also, how to I check if an sql statement fails during a stored procedure?
Mighty