Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert is not happening

Author  Topic 

Sundaresan
Starting Member

28 Posts

Posted - 2008-01-12 : 09:40:20
Hi,

Im facing one problem When more than one user tries to insert record through the application only one users data is getting inserted. Wat might be the problem?

This is the stored proc im using..

create
proc [dbo].[GSK_insertregion] (@Country varchar(50),@Userid int,@RegionId varchar(50))
as
begin
insert
into UserHierarchy(Country,Userid,RegionId) values(@Country,@Userid,@RegionId)
end


Please help..

Sundaresan.R

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-12 : 09:45:03
When is this problem noted? Is it when lots of users are trying to insert simultaneously? Also are there any unique contraints in table which insert is violating? Can you give some info about the error returned to user?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-12 : 12:10:34
Trace it in profiler.
Go to Top of Page

ranjeetsingah
Starting Member

3 Posts

Posted - 2008-01-13 : 09:50:36
Hi,
try this one

create
proc [dbo].[GSK_insertregion] (@Country varchar(50),@Userid int,@RegionId varchar(50))
as
begin
begin transaction
insert
into UserHierarchy(Country,Userid,RegionId) values(@Country,@Userid,@RegionId)
commit transaction
end

Ranjeet Singh
Software Engineer
Mobile- +91-9910893772
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-01-14 : 07:06:44
Have you checked to see if someone has accidentally left the server on SINGLE-USER mode?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -