Retrieve a memo field from MS Access

Retrieve a memo field from MS Access

Post by bchoki » Sat, 27 Apr 2002 02:38:45



Hi,

I have created a table called Messages and a field Message and I want to
retrieve it using a query

<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
   String url = "jdbc:odbc:Phase3";
   Connection cn = DriverManager.getConnection(url);
   Statement stmt = cn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM Messages");
%>
<%while(rs.next()) { %>
<%=rs.getString("Message")%>

<% } %>

It gives an error "string right tructated"..can anyone please solve my
problem..its Urgent..

SA

 
 
 

Retrieve a memo field from MS Access

Post by Simon Gibb » Sun, 28 Apr 2002 02:13:12



> <%=rs.getString("Message")%>
> It gives an error "string right tructated"..can anyone please solve my
> problem..its Urgent..

> SA

I would use a CLOB object java.sql.Clob

http://java.sun.com/j2se/1.3/docs/api/java/sql/Clob.html

Simon

--

unchecked (it's usually spam). To reply substitute "usenet"
with "mail", or any 1 word appropriate to the topic.

Web Site: http://www.simongibbs.co.uk/

 
 
 

1. Problem retrieving the memo field in Access.

I am accessing an Access database in VB using ADO. When I try to retrieve
the value of a memo field, the program returns a null value even though
Access memo field contains a string. When I use a watch expression on that
field I notice that it contains the string value for a short period of time
and then changes to Null for no apparent reason. Is this a bug with Access,
VB or ADO.

I get this problem only with the memo field in Access.

Hope this can be solved.

Thanks in advance.

Greg

2. General Replication/Design Advice

3. ms access memo field

4. Continuous Log Backup to Disk

5. JDBC-ODBC and MS Access MEMO Field

6. Can "autogrow" log be turned off?

7. problem with Memo field in MS Access

8. Very strange JDBC problem

9. MS Access memo fields

10. MS Access and Memo Fields

11. Reporting Rich Text in Memo Field in MS Access

12. Updating Memo Fields in MS Access using ADO Parameter / Stored Procedures

13. Retrieve MS Access field property values?