MS SQL Read but no write(update)
-
We are using MS SQL Sever and have set up the SQL Data Source and have connected and can read the table. When we go to insert or update a record we get “'sqltest': Exception while setting point Varchar: com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range.”
I have tried both Numeric and Alphanumeric data points. Are there any examples of an insert or update string? -
Hi larry,
Can you post a screenshot of the point you are trying to set's edit page as well as provide the value you are setting it to?
That exception sound to me like you may not have added parameter types to match the
?
in your update statement, or perhaps there is a mismatch between the count of the parameters and the items in the value you are setting. -
We got it working. Mango writing to it with insert and SQL truncating the table so the we only use two rows. Using it for serial number validation from the SQL Database and passing ether a pass or fail to the PLC, then the PLC writes back a complete and SQL clears the table. One string and one int.
Thanks for your help -
Nice! Glad you got it working!