Getting SQL truncation from runPrepStmt

I have a popup window that collectes a bunch of values from the user to update an SQL table. I have the following code statement to insert a new record into the table:

if ID == None:
        fpmi.db.runPrepStmt("insert into ProdAlerts.dbo.tblPOVCIP (ProcessID,Operator,CIPDate,Protocol,Vessel,Comments,Type,Sprayhead,PSI,Sanitizer,Sprayhead2,PSI2) values (?,?,?,?,?,?,?,?,?,?,?,?)",[proc,initials,date,protocol,tank,notes,mytype,sphd1,psi1,sani,sphd2,psi2])

The problem is that I get the following error:
Gateway Error 301:
SQL Error: Data Truncation
For Query:insertinto ProdAlerts.dbo.tblPOVCIP(ProcessID,Operator,CIPDate,Protocol,Vessel,Comments,Type,Sprayhead,PSI,Sanitizer,Sprayhead2,PSI2) values (?,?,?,?,?,?,?,?,?,?,?,?)

The real weird thing is that I copied this popup window from an existing one that updates the same table. Inside that other popup window code, I run this exact command and it works fine. I have checked the variables that are being entered, and they are all valid.

Any idea why I get this error pop up?

Hmm… I’d take a close look at the values you’re passing in and make sure they really are valid for how your table’s configured. For instance, maybe you have a column declared CHAR(3) and you’re passing in a larger string or something. If you pull up your table schema you might notice something right away.

If it works in the other screen there must be something slightly different- probably in the data being passed in. One of the values must be larger than column allows, and this often happens with strings (though it also happens from time to time with people trying to write numbers to bit fields and stuff like that).

Hope this helps,

That was the problem. As it turned out, users were allowed to enter values in the old application. I am forcing them to pick from a dropdown list to insure the tanks put into the database correspond to a real tank. The field that is supposed to hold the tank names was one character too short. The reason it worked from the other window is that the tank names that are valid from this choice did not overflow the field.

Thanks again,