Thanks, but I got it solved now, I had a brainstorm while having a cigarrette break 
:-). insetad of using ps.setString(...) I'm using now:
ps.setObject(4, request.getParameter("comment"), java.sql.Types.LONGVARCHAR);


Thanks again. 



Ben Groeneveld <[EMAIL PROTECTED]> wrote:

>Fred, this sounds related to msaccess and not JDBC.  I regularly update 
>oracle text fields via JDBC that are 3200 wide.  Maybe see if there 
>isn't another datatype you can use.  Hope that helps.  BenG.
>
>Fred Schroomnig wrote:
>
>>Hi All, I have an access DB for fooling about on. I'm trying to enter a text Longer 
>then 255 characters into a 'memo' field. I'm using a PreparedStatement and my code 
>looks something like this:
>>
>>ps = conn.prepareStatement("INSERT INTO table (First, Last, eMail,comment) VALUES(?, 
>?, ?, ?)");
>>ps.setString(1, request.getParameter("First"));
>>ps.setString(2, request.getParameter("Last"));
>>ps.setString(3, request.getParameter("eMail"));
>>ps.setString(4, request.getParameter("comment"));
>>
>>It works fine if the 'comments' value is less the or equal to 255 Characters, it 
>crahses with an error telling me that the String is to long. The question is how do I 
>enter Strings longer then 255 chars into a DB using JDBC?
>>
>>Tahnks in advance, 
>>
>>Chris
>>
>
>-- 
>Ben Groeneveld 
>Information Concepts, Inc., 115 N.W. Oregon, Suite 30, Bend, OR 97701
>Mailto:[EMAIL PROTECTED], phone:541.388.3611, cell:208.520.6488
>
>
>
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to