From: | Michael Stephenson <mstephenson(at)tirin(dot)openworld(dot)co(dot)uk> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: TEXT Data Type |
Date: | 2002-11-19 17:38:50 |
Message-ID: | Pine.LNX.4.30.0211191733500.21945-100000@tirin.openworld.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
The text type shouldn't have any limit, it seems more likely that your
string contains characters which haven't been correctly escaped, can you
try the following code and see if you still have the problem:
String sqlStr = "INSERT INTO news_articles VALUES (?, ?, ?)";
PreparedStatement pstmt = con.prepareStatement(sqlStr);
pstmt.setString(1, author);
pstmt.setString(2, title);
pstmt.setString(3, theLargeString);
pstmt.executeUpdate();
Michael
Sagine wrote:
> Hi im using version 7.2, and im trying to insert very large strings into
> the TEXT field but i keep getting: parser error "000";
> I noticed i get that error when the string is over 50-60 characters
> long, I thought the TEXT feild had no limit. Here is my code:
>
> String sqlStr = "INSERT INTO news_articles VALUES
> ("'"+author+"', '"+title+"', '"+TheLargeString+"')";
> PreparedStatement pstmt = con.prepareStatement(sqlStr);
> pstmt.executeUpdate();
>
> thanks in advance for the help
> Sagine
--
Web Applications Developer
Open World Ltd, 11 Riverside Court, Riverside Road, Bath, BA2 3DZ.
Tel: +44 1225 444950 Fax: +44 1225 336738 http://www.openworld.co.uk/
CONFIDENTIALITY NOTICE
The information contained in this message is confidential, intended only for
the use of the individual or the entity named as recipient. If the reader of
this message is not that recipient, you are notified that any dissemination,
distribution or copy of this message is strictly prohibited. If you have
received this message in error, please immediately notify us by telephone on
the number above. Your co-operation is appreciated.
From | Date | Subject | |
---|---|---|---|
Next Message | Nic Ferrier | 2002-11-19 19:00:58 | Re: streaming result sets: progress |
Previous Message | Felipe Schnack | 2002-11-19 17:11:19 | Re: default values |