File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

memo field in Access

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
How do I get the info out of a memo field in Access? I am using resultSet.getString(...) It keeps coming back with an error. I seem to recall somewhere else reading that there was a problem with memo fields, but I haven't come across a solution.
thanks
 
Milind Kulkarni
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brian,
I think you should refer to driver documentation for accessing memo field in access.
Regards,
Milind
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
I was just using the jsbd dbc bridge that comes with Java. Is there a way to do it using sun's driver, or do I need to get a driver specialized for MS Access?
 
Milind Kulkarni
Ranch Hand
Posts: 146
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brian,
What kind of problem are you experiencing? A fix has been made in JDBC-ODBC bridge in the latest version of JDK (1.3) to solve OutOfMemory exception when getString() is used on a Memo field of MS Access. Check out this URL for the details: http://java.sun.com/j2se/1.3/fixedbugs/1.3.0/index.html
Regards,
Milind
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
I was not sure what is a memo field. I got the following from Microsoft help.
Use the Memo data type if you need to store more than 255 characters. A Memo field can store up to 64,000 characters. Memo fields can't be indexed or sorted.
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
I had to use getAsciiStream() and setAsciiStream() for memo fields. actually, I never had any trouble reading the memo fields, but have always got "right truncated" exceptions when trying to write memo > 2025 bytes; but it was simpler for me to use the stream routines for both reading and writing ( I could get by with just the setAsciiStream() routine ).
By all means, you should make sure that you are using JDK 1.3, because there were some other SQL related problems with 1.2.2, most notably to me was erroneous "Function Out of Sequence" errors.
 
MarkB
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This worked for me:
BufferedReader br = new BufferedReader(new InputStreamReader(rs.getAsciiStream("Your Field Name")));
comments = br.readLine();
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic