Copy link to clipboard
Copied
Here's my code:
<textarea rows="3" name="unavailability" cols="63" wrap="virtual" ></textarea>Comments
This field is being cut off at 50 chars in my SQL server from a cold fusion page. What can I do to allow more than 50 chars (or even unlimited) to be accepted?
Thanks,
Phil
Copy link to clipboard
Copied
btw, my SQL server column is varchar(max), so it's not cutting off there.
Copy link to clipboard
Copied
Where is your code that does something with the form data when it is submitted ultimately being used in some type of SQL or Stored Procedure to get inserted into the database.
Copy link to clipboard
Copied
It's in a seperate page. Page one (with the textarea) posts to this page which does a Stored procedure call:
<cfstoredproc procedure="blah" datasource="blah_blah">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@netid" value="#Session.netid#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@first_name" value="#Form.first_name#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@last_name" value="#Form.last_name#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@department" value="#Form.department#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@areas_of_research" value="#areas_of_research#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@student_capacity" value="#Form.student_capacity#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@unavailability" value="#Form.unavailability#">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="@vita_URL" value="#Form.vita_URL#">
</cfstoredproc>
Copy link to clipboard
Copied
Step 1 - cfdump your form scope. See if the truncation has already occurred.
Copy link to clipboard
Copied
After that, if the form data is correct.
Look at the stored procedure you are calling. Are the in parameters limited in length?
Copy link to clipboard
Copied
Ian,
You hit the nail. I had varchar(50) in the paramater section for the SP.
Thanks,
Phil
Copy link to clipboard
Copied
That will do it to you every time.