Marko
|
| Posted: 10/15/2002, 3:43 AM |
|
Is it possible to make this kind of insert to work with CCS 1.0.7.0 form(record):
begin;
insert into blah(blah, blah) values (valuefromform, valuefromform)...
commit;
Meaning, how to implement several SQL commmands (begin, insert, commit) to one CCS SQL statement?
Any help appreciated.
|
|
|
 |
Andrew B
|
| Posted: 10/17/2002, 8:39 PM |
|
Why the begin & commit? Either your DB provider supports that type of dynamic query or not. I am pretty sure SQL Server doesn't allow you to do that type of stuff.
If you are tyring to do transactions, I would say you should implement it in a stored procedure (with many params). If you are ond windows check out ProcBlaster to get a nice jump on writing the proc & the ADO code to use it. Costs a little bit though, but it is much worth the $ if you do this a lot.
Otherwise you can modify the insert code that CCS generates to do whatever you want. You will have to overwrite the code they generate with your own to begin a transaction, update the data, and include rollback logic much the same as you would have to do normally. With CCS though you have access to all their nice param setup & error reporting :)
If you look in the code for the page you should be able to find the section that does the insert. It should be in the 'INSERT ROW' function in the class for your form. Take a close look at the code there to see how errors are handled & such.
|
|
|
 |
|