all groups > sql server programming > july 2006 >
You're in the

sql server programming

group:

SP to undo transaction



SP to undo transaction panda
7/30/2006 10:08:02 PM
sql server programming: Hi,

I am developing a simple web based database front end where users can modify
db data through the use of forms.

The server side application that i have programmed sometimes creates SQL
syntax that causes errors and as a result inconsistent data. Is it possible
to simulate the statement that i have created to test if it does work with no
errors?

RE: SP to undo transaction Omnibuzz
7/30/2006 10:37:01 PM
Run the profiler and check out the command text, that should give you the
idea of what query that you running against the database.

--
-Omnibuzz (The SQL GC)

http://omnibuzz-sql.blogspot.com/



[quoted text, click to view]
Re: SP to undo transaction Brian Selzer
7/31/2006 1:24:01 AM
Yes. But it appears from your question that you are generating SQL
statements on the fly. If that is the case, then you should look up SQL
injection, and then alter your code to use a parameterized query. It also
appears that you either haven't applied adequate constraints to the database
to prevent inconsistencies, or are affecting multiple tables without using a
transaction.

SQL Profiler can be used to trace every SQL statement presented to the
database.

[quoted text, click to view]

Re: SP to undo transaction Uri Dimant
7/31/2006 8:21:21 AM
[quoted text, click to view]

Pehaps you should to learn SQL syntax instead. What is the version are you
using?

In SQL Server 2005 we have TRY BEGIN CATCH ... to deal with errors




[quoted text, click to view]

RE: SP to undo transaction panda
8/1/2006 5:02:01 PM
Thank you for all your replys. Sorry for my ignorance about SQL server. I am
not too familar with the more advanced or simple functions other than
creating a table and accessing the database.

Regards

[quoted text, click to view]
Re: SP to undo transaction panda
8/1/2006 5:05:01 PM
I am using SQL Server 2000.

I am familar with simple SQL Syntax. It is when i have to modify several
tables and i execute the statements in sequence. When a statement down the
track fails then my database is inconsistent.

[quoted text, click to view]
Re: SP to undo transaction panda
8/1/2006 5:06:02 PM
It is when i have to modify several tables and i execute the statements in
sequence. When a statement down the track fails then my database is
inconsistent.

Sorry for my ignorance but what is "look up SQL injection" and "use a
parameterized query".

Regards

[quoted text, click to view]
RE: SP to undo transaction panda
8/1/2006 5:08:01 PM
sorry for my ignorance but what is the profiler? can be executed through ASP?

[quoted text, click to view]
RE: SP to undo transaction Augustin Prasanna
8/2/2006 1:18:01 AM
Profiler is a tool shipped along with MS Sql server. It can be used to trace
the commands executed against the sql server.

[quoted text, click to view]
AddThis Social Bookmark Button