![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have a short procedure which compiles fine. When the code is called from a webpage(.net) it runs the first time it is executed. However on the second time it throws an error saying "There is already an object named 'strPKHoldUp' in the database." StrPKHold is a variable that I declare in the code as seen below.... |
#3
| |||
| |||
|
|
Hello, I have a short procedure which compiles fine. When the code is called from a webpage(.net) it runs the first time it is executed. However on the second time it throws an error saying "There is already an object named 'strPKHoldUp' in the database." StrPKHold is a variable that I declare in the code as seen below.... I have never had a problem before with declaring a variable and having it "save or cache" in the database so you can use it again. Any idea how to solve this? I tried moving the DECLARE statement around a little bit but that didnt help. I changed the variable name to something else and it works one time but fails after that... DECLARE @strPKHoldUp int -- PUT IN THE CODE TO SEE IF THE PK AND THE TYPE ALREADY EXIST. IF SO, UPDATE. IF NOT THEN INSERT. select MR_MITIGATION_UPLOADS_MITIGATION_FK into strPKHoldUp .... if @strPKHoldUp = 0 |
![]() |
| Thread Tools | |
| Display Modes | |
| |