473,511 Members | 16,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Doubling the order in my table

When user clicks SAVE button, it creates a new order with some products.

I open connection, set isolation level on adXactIsolated(1048576) - because
I have trigger on tables,
and then begin transaction. (For all other isolation levels trigger is not
rolled back!)

I then execute couple sql stored procedures, which inserts couple tables and
at the end if everything is fine, I commit transaction otherwise I rollback
transaction.

Everthing is fine, but sometimes happends that I get 2 or 3 orders, exactly
the same. It looks like that the system copy couple times the same order in
the table. I don't know why?

At the begin of the page I have:

Response.Expires = -1
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"

so refresh of the page is not possible - anyway, that is not happening so
there is 100% no source of the problem.

And my code looks like:

set Cn=Server.CreateObject("ADODB.Connection")
Cn.Open connectionString
cn.IsolationLevel=1048576
cn.BeginTrans

sql="exec e_skladisceizdelek '"&idIzd&"',"&kolicinaNova&","&idSklCilj
cn.execute(sql)

sql="exec e_skladisceizdelek '"&idIzd&"',-"&kolicinaNova&","&idSkl
cn.execute(sql)

sql="SET NOCOUNT ON; DECLARE @idPrenosa int;exec e_prenosSkladiscIzd
'"&idIzd&"',"&kolicinaNova&","&idSkl&","&idSklCilj &","&session("uporabnik")(
0,0)&","&komentar&",@idPrenosa OUTPUT; SELECT @idPrenosa"

idPrenosa=cn.EXECUTE(SQL).Fields.item(0).Value

IF ERR.number=0 then
cn.CommitTrans
else
cn.RollbackTrans
Response.Write err.Description&err.Source&"
end if
cn.Close
set cn=nothing

Does anybody know the solution?

Thank you,
Simon
Jul 19 '05 #1
0 1006

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
17079
by: boonkit | last post by:
I try to get better performance by implementing this: http://dev.mysql.com/doc/mysql/en/alter-table.html "ORDER BY allows you to create the new table with the rows in a specific order. Note...
1
6087
by: mailar | last post by:
Hi, Can I use ORDER BY clause in my sql UDF that returns a table and has the folloing body. (trial_udf.sql) drop function aa@ create function aa() returns TABLE(empno varchar(20)) language...
8
6797
by: kaosyeti | last post by:
i have a (hopefully) small problem. i have created a system where a user enters customer information into a table through a form. this table has no primary key. there are 9 fields on the form to...
2
2541
by: Dave Williamson | last post by:
When a ASPX page is created with dynamic controls based on what the user is doing the programmer must recreate the dynamic controls again on PostBack in the Page_Load so that it's events are wired...
6
1630
by: meanster99 | last post by:
Can someone please help me! I have created a db in Access 2003 and the overall file size keeps doubling periodically. Before I noticed this phenomenon the DB was at 65Mb (could have been happening...
4
1011
by: Nate | last post by:
Before I go through posting a lot of code, a quick question ... Has anyone come across a problem with a DataView showing duplicates of the desired data? I'm querying a SQL table and the DataView...
0
1507
by: DC01 | last post by:
I have added a new measure successfully into the normal cube. I then add it to the virtual cube and reprocess all cubes. I can browse the normal cube successfully. Then when I try and browse the...
2
2094
by: Blasting Cap | last post by:
I've got a gridview (that I converted over from a datagrid, which had been working properly), that is doubling up the number of rows returned. When it was running as a datagrid, the same code sent...
4
3696
by: fluff | last post by:
Hello. I want to display some data from a database in a certain order. I have a table with columns A, B, Date. I want to display the records that have data in column A first and I want those...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
446
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.