Link to home
Start Free TrialLog in
Avatar of ALawrence007
ALawrence007

asked on

SQL Transaction insert

Hi,
I have a SQL based web application. The application requires about 50 textbox inputs. I created the application using a transaction for insert and if all is O.K. then a commit statement.

My question: Will this give me any issues when I place this on my intranet? Will the table be non usable?
Are there any suggestions if this is not the right way to go?

The reason I went this way is to prevent multiple non usable entries into my Master table if there are any issues.

Thanks
SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ALawrence007
ALawrence007

ASKER

Thank you! All answers to my question.

This is my current set up:
insert1="inert into table1 (field1) values('ss')"
cmd.ExecuteNonQuery();
insert2="inert into table1 (field1) values('ss')"
cmd.ExecuteNonQuery();
insert3="inert into table1 (field1) values('ss')"
cmd.ExecuteNonQuery();
>This is my current set up:
in this case, you can probably create an XML at the front end and pass it to the back end; in the back end you can fetch the data fron the xml and insert into the table.  in this way you can reduce the transaction length.
>> in this way you can reduce the transaction length.
actually, if you plan to take this approach, you will not need a transaction ..
yup, correct