My code goes like this:
CREATE PROCEDURE ins_Fab_topc_re qs_stats
(@Subj_id numeric(13,0),
@Info_upd_id numeric (13,0),
@Info_src_cd code ,
@Sys_id varchar (15),
@Tot_topc_cnt int,
@Prcs_topc_cnt int ,
@Prcs_topc_lst varchar (500) ,
...
User Profile
Collapse
-
Primary key violation
Hi,
I have a table having composite primary key - 2 numeric columns and 1 varchar column . In my application, whenever i insert a row into a table,i check if the row exists in the table or not for the given primary key combination. If it exists i UPDATE the row, else insert.
But even after such checks, i am getting primary key vioaltion errors in bulk.
May be its due to the multithreaded java application... -
xml data processing in procedure sql server 2005
Hi all,
I have xmls stored in a TEXT column in a table.I retrieve these xmls as string from the table and pass on to java application.
Now i want that before sending the result to java, i need to do some modification to the xml data.
For eg. , say i want to remove one section of the xml and display the rest or display after removing one loop of a section based on certain condition.
Can any... -
Urgent - Strange Problem With Stored Procedure
Java application invokes my stored procedure. But i am getting a strange exception when the application calls the procedure. The exception is:
"The statement or function must be executed in the context of a user transaction."
When i execute the procedure manually as a block , it runs fine. But when application invokes it, this exception occurs.
The procedure has some special functions like -... -
Subrat Das replied to Duplicate key insertion error when concurrent users insert same data into tablein SQL ServerI am using IF NOT EXISTS(select.. .) then insert.Any idea about sp_getapplock. I saw in a site http://sqlblogcasts.co m/blogs/tonyrogerson/archive/2006/06/30/855.aspx
a solution for it, but unable to implement it.
If i change the way i am checking for the existence of row, will it help.Waiting for your valuable suggestions....Leave a comment:
-
Subrat Das started a topic Duplicate key insertion error when concurrent users insert same data into tablein SQL ServerDuplicate key insertion error when concurrent users insert same data into table
Hi,
I have a java application which calls a stored procedure to insert data into a table.Multiple threads of java call the same procedure at the same time. Sometimes it happens that few threads send the same data as parameter to the procedure. In that case i get the error : "Cannot insert duplicate key row in object ...."
The functionality of the proc is - It checks if a given data (Based on Unique key) is present...
No activity results to display
Show More
Leave a comment: