LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Error -2147217887

Hello everyone,
i have big trouble with send query to MSSQL. It´s a stored procedure. First procedure is InsertNewProduct and everything works fine, but every other next procedure has same error. I tried to solve this for last two days and I don´t find answer anywhere on forum. I know, that´s not problem with LV, but with SQl,but create query in LV is very specific, so please help me. 

ALTER PROCEDURE [db_procedure].[InsertOperationStatus]
    -- Add the parameters for the stored procedure here
    @SerialNumber varchar(MAX) = NULL,
    @WorkplaceRegistrationNumber varchar(MAX) = NULL,
    @StatusId varchar(MAX) = NULL,
    @ActiveUserRightId varchar(MAX) = NULL,
    @ModifyUserId varchar(MAX) = NULL,
    @TimeStamp varchar(MAX) = NULL,
    @TimeZone varchar(MAX) = NULL,
    @ErrorCode int = NULL OUTPUT,
    @ErrorText nvarchar(250) = NULL OUTPUT

Kafee17_0-1643356275300.png

 

0 Kudos
Message 1 of 2
(672 Views)

Hi!

 

Just a hint:

I like this style very much, since it's clean and simple:

 

SebastianWeber_0-1643880449334.png

Note:

  • It can be dangerous to pass unknown strings directly into the query, so be sure to not send anything harmful  (https://xkcd.com/327/)
  • The elements of the cluster inside the array must match the expected output from the database, i.e. order of elements, number of elements and type (though, it will happily convert a number to string etc)
0 Kudos
Message 2 of 2
(642 Views)