SQL update/insert fields being trancated
Posted: Thu Sep 27, 2012 1:59 am
I have succesfully INSERTed and UPDATEd to SQL tables from my livecode stacks.
With a table I am using now, I have two 'text' columns which don't have a fixed length.
When I put together the SQL statements the text in these two fields is truncated to 30 characters each time.
The following is the statement and the fields tnotes and tactivity are the fields that are being shortened to 30 characters as soon as the tCmd statement is put together.
put "INSERT INTO " & gTableName & \
" (" & quote & "ID" & quote & ", " & quote & "requester_user_id" & quote & ", " & quote & "assignee_user_id" \
& quote & ", " & quote & "notes" & quote & ", " & quote & "activity" & quote & ") " & \
merge("VALUES ('[[tticket]]', '[[trequester_user_id]]', '[[tassignee_user_id]]', '[[tnotes]]', '[[tactivity]]')") into tCmd
I have used the same sort of statement for another table that had one of these 'undefined length' text fields and it works fine.
Any help would be appreciated. Thanks.
With a table I am using now, I have two 'text' columns which don't have a fixed length.
When I put together the SQL statements the text in these two fields is truncated to 30 characters each time.
The following is the statement and the fields tnotes and tactivity are the fields that are being shortened to 30 characters as soon as the tCmd statement is put together.
put "INSERT INTO " & gTableName & \
" (" & quote & "ID" & quote & ", " & quote & "requester_user_id" & quote & ", " & quote & "assignee_user_id" \
& quote & ", " & quote & "notes" & quote & ", " & quote & "activity" & quote & ") " & \
merge("VALUES ('[[tticket]]', '[[trequester_user_id]]', '[[tassignee_user_id]]', '[[tnotes]]', '[[tactivity]]')") into tCmd
I have used the same sort of statement for another table that had one of these 'undefined length' text fields and it works fine.
Any help would be appreciated. Thanks.