From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

SQLExec: Extra character inserted during database INSERT and UPDATE

I am using Lookout's (V6.7.1 in Win7) SQLExec object to INSERT and UPDATE records to an SQL Server database.  All numerical values are stored to the database with no issues.  However, I need to write/update a 3 character string as one field of the record and it appears Lookout adds a space character to the beginning of the string each time the INSERT or UPDATE is executed through the SQLExec object and this creates SQL errors during subsequent UPDATE's after I read a record into Lookout.  When I created the table in SQL Server, I had to define the string as 4 characters long even though I only needed 3.  It appears SQL Server requires a string to be defined with an extra character.  Has anyone else experienced this issue?  How can I fix it? 

0 Kudos
Message 1 of 2
(2,753 Views)

Have not had this issue before.

We insert alarms into our alarm software in this method, but we use nvarchar (255 character) fields.

-----------------------------------------------------------------------
Forshock - Consult.Develop.Solve.
0 Kudos
Message 2 of 2
(2,673 Views)