file.memo = new StringBuffer(rs.getString("memo"));

解决方案 »

  1.   

    file.memo = new StringBuffer(rs.getString("memo"));
      

  2.   

    file.memo = new StringBuffer(rs.getString("memo"));
      

  3.   

    memo这个类是个什么类型的啊?
      

  4.   

    哦,,如果File类里除了id外还有Vector memo成员和别的自定义类成员,mysql的memo字段类型设为longtext:
    file.memo  =  new  StringBuffer(rs.getString(  "memo  ")); 用这种方法还是转化不过来的
      

  5.   

    我都说晕了:P
    ...
    定义了一个list类,里面包括Vector类成员还有别的自定义类成员。
    还定义了一个File类,里面包括list类成员,
    数据库中的list字段为longtext型file.list=  new  StringBuffer(rs.getString(  "list")); 这样的话,还是不对的
      

  6.   

    要看看你的new list()生成什么类型的东西。
    还有它提示什么错误呢?
      

  7.   

    谢谢大家的提示
    只要给list类写个构造函数,而不是直接类成员初始化。再用openFile.aclList =  new ACLList(rs.getString("acl_list")); 就可以了 ^0^