![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, Not sure if this is the right forum to post this! VB 2005 Prof, SQL server 2005, Windows application Scenario: In a winform application, using SQL server authentication method (not windows authentication), we have a text/binary file containing multiple SQL statements (insert,update,delete commands) for multiple tables. From the Winform , we need to create a process wherein we process this file and update the database. In case of a failure to process any sql statement in the middle of this file (for whatsoever may be the reason , possibility is remote but should not be excluded), then all the transaction need to be rolled back - meaning the database state should be same as before we started the processing of this file. Query: What is the best method to carryout this functionality without using DTS. Ofcourse, this process should be executed from a winform and from a client machine. Thanks. |
#3
| |||
| |||
|
|
In the input file, start a TRANSACTION before the current SQL Statements, test each statement for success/failure, and either ROLLBACK abort further processing, or at the end, COMMIT as appropriate. However, you are opening your server to major security risks. What is the nature of the input file? Is it being created by the user? Created by the application? Or is it static? Could it be transformed into a stored procedure? -- Arnie Rowland, Ph.D. Westwood Consulting, Inc Most good judgment comes from experience. Most experience comes from bad judgment. - Anonymous You can't help someone get up a hill without getting a little closer to the top yourself. - H. Norman Schwarzkopf "AnikSol" <anisol (AT) community (DOT) nospam> wrote in message news:uobiTGy%23GHA.4356 (AT) TK2MSFTNGP05 (DOT) phx.gbl... Hi All, Not sure if this is the right forum to post this! VB 2005 Prof, SQL server 2005, Windows application Scenario: In a winform application, using SQL server authentication method (not windows authentication), we have a text/binary file containing multiple SQL statements (insert,update,delete commands) for multiple tables. From the Winform , we need to create a process wherein we process this file and update the database. In case of a failure to process any sql statement in the middle of this file (for whatsoever may be the reason , possibility is remote but should not be excluded), then all the transaction need to be rolled back - meaning the database state should be same as before we started the processing of this file. Query: What is the best method to carryout this functionality without using DTS. Ofcourse, this process should be executed from a winform and from a client machine. Thanks. |
#4
| |||
| |||
|
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Hi , How is everything going? Please feel free to let me know if you need any assistance. Sincerely, Wei Lu Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
![]() |
| Thread Tools | |
| Display Modes | |
| |