• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

memo field in Access

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This worked for me:
BufferedReader br = new BufferedReader(new InputStreamReader(rs.getAsciiStream("Your Field Name")));
comments = br.readLine();
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic