Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Error running stored procedure using the SQL API
-
While using the SQL API, I am receiving the error:
Msg 50000, Level 16, State 42, Procedure HandleError, Line 29 50000
1642HandleError29515162Events_RaiseEvent22Cannot insert the value NULL into column 'User_Name', table 'BuildMaster.dbo.EventOccurences'; column does not allow nulls. INSERT fails.Is there a solution to this problem?
-
Before directly executing a stored procedure, you will need to set the CONTEXT_INFO. This information is used to trigger events and set the value of the CreatedBy and LastModified user name. This only needs to be done once per connection, and you can use this script to set it:
DECLARE @B VARBINARY(MAX) SET @B = CAST('yourname' AS VARBINARY) SET CONTEXT_INFO @BObviously, "yourname" should be replaced with a more meaningful string, but it doesn't have to be your username. It could be "SQLAPI".
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login