Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSDE, how many connections?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00329756
Message ID:
00330217
Views:
15
Mike, here is the problem:

Here is the procedure and the procedure call. This is used to get a unique ID at the beginning of the application. Works with one user, add a second and it freezes on the SQLEXEC statement. Also, procedures works consistantly in Query Anazyler.


*- Fox Code
lnStartKey = 0
= SQLEXEC(oCMIS.ConHandle, '{CALL spGetKey(?@lnStartKey)}')
oCMIS.StartKey = lnStartKey

*- SQL Server Code
CREATE procedure spGetKey(
@retKey int = null output)
as
declare @lnKey int
set @lnKey = (select theKey from Keys)
set @lnKey = @lnKey + 1
update Keys set theKey = @lnKey
set @retKey = @lnKey

Any help would be appreciated.
Thanx,
Charlie
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform