Three things I would like to point out:
1) Field length. In MS-Access 2000, column of datatype 'memo' can contain
up to 65,535 characters. So this should not be a problem
2) request.parameter("comment")-- I am sure this will not create a
problem.
3) The only remaining case is ps.setString(). This is totally depends on
the JDBC Driver you are using. e.g. if you are using oracle thin driver you
can enter upto 2000 charaterc using setString().
So, check the third one( it's ofcourse upto u) and hope ur problem will be
solved.
Nikhil R Silsarma
Developer
DigitalRUM UK Ltd.( London)
Tel: 020 7691 5549
-----Original Message-----
From: Ben Groeneveld [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2002 17:16
To: JRun-Talk
Subject: Re: LongTexts
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
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists