Sql Stored Proc fail.

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
28,048
Reaction score
17,803
Two hours now staring at this while it stares back at me stubbornly like an annoying creature. The Insert is not happening. I get the Record Inserted message, yet nothing. What can you see wrong :cry:

SP1.jpg

SP2.jpg
 
That did it!!!!!

Muchas gracias señora :D
 
You also need to consider putting in some validation in your stored procedure and code. This could have been avoided if you actually output an error or success which would have shown the issue immediately.
 
You also need to consider putting in some validation in your stored procedure and code. This could have been avoided if you actually output an error or success which would have shown the issue immediately.

Well, no.

He stated that no exception was thrown...
 
Well, no.

He stated that no exception was thrown...

Well, he could have checked for the returned value, to know if the insert was successful. SQL insert may fail, doesn't mean there will be an exception thrown, but you can still check for it.
 
Well, he could have checked for the returned value, to know if the insert was successful. SQL insert may fail, doesn't mean there will be an exception thrown, but you can still check for it.

I've never experienced an insert statement quietly failing before.
 
Correct me if I'm wrong, but ExecuteNonQuery will return the number of rows affected, in this case 0, with no error in code?
 
Going to modify the code above to return the SCOPE_IDENTITY() field on insert. I'll post it here when done :)
 
Top
Sign up to the MyBroadband newsletter
X