Sql Db Issue

Chuck Woodbury

Lifetime Supporting Member
Join Date
Apr 2005
Location
Valley Springs, California
Posts
78
Hi all,
I am working in iFix to SQL. I have extended my table and SQL cmd but now I get this error: Error. SQL cmd %s is not terminated or too long. My SQL command is: Insert into LogDryer (Date_Time, DR_State, A_Res, B_Res, C_Res, A1_Temp, A2_Temp, A3_Temp, A4_Temp, A5_Temp,B1_Temp, B2_Temp, B3_Temp,C1_Temp, C2_Temp, C3_Temp, Cool_Temp, LE_Left, LE_Center, LE_Right, TE_Left, TE_Center, TE_Right, A1_Humid, A2_Humid, A3_Humid, A4_Humid, A5_Humid, B1_Humid, B2_Humid, B3_Humid, C1_Humid, C2_Humid, C3_Humid) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);

I have seen much larger tables and commands so this has me baffled.
Anyone a guru in SQL?
Thank you.
 
It is probably the maximum length of the command 'string' is greater than allowable string data type of IFix (256 characters?)
Try splitting the SQL command into several seperate SQL Insert commands so that the command length is shorter

I dont use IFIX but try somthing like this

strString1 = "INSERT IGNORE INTO" and include a primary key
sql write instruction
strString2 = "UPDATE ???? WHERE " primary key=the primary key from the insert command
sql write instruction
 
Last edited:
The default number of characters for an SQL statement is 255. To increase it add the /CLx switch to WSQLODC in the task config section of the SCU (where x is the max number of characters allowed in the SQL statement e.g. /CL1000 )
 
Last edited:
Thank you all. The SCU had /CL5000. I increased it to 10000. Same error. Have yet to break up the cmd. I will give that a try next week. Even at 10000 I am getting the error. I have split the command and am logging to two different tables. I also created another table to work on getting all into one. At least for now data is logging. Marshy, I again thank you for pointing out the Alarm Window on the iFix Forum. That is one of the most useful tools I have seen yet.
 

Similar Topics

Good Morning All, I am looking to sync a data log to a SQL server using a RL DSPZR. The sql server that I am trying to connect to is running on a...
Replies
0
Views
3,014
Hi Everybody, While I am trying to start configure RSSql,I m getting Error(33190)'The service could not validated using specified username and...
Replies
0
Views
3,451
Hi all, I'm having difficulties trying to connect FactoryTalk View SE Local Station (V13.00) to MS SQL Server Express. I state that they are...
Replies
2
Views
131
Hi all, I have FTV v13 installed on my VM. I made an ME application and exported it in v11, as that's the version being used on the Panelviews at...
Replies
3
Views
394
Dear colleagues, I am reaching out for assistance with an issue I am having. I have a code that can successfully insert data from FactoryTalk...
Replies
6
Views
1,045
Back
Top Bottom