我记得mysql好像不行吧,换成存储路径吧

解决方案 »

  1.   


    不是吧
    我一直用的都是mysql
      

  2.   

    java.sql.SQLException: Syntax error or access violation语法错误或者权限问题咯.
    用户名和密码啊.
    你的SQL语法啊.
      

  3.   

    四个本问题的贴子至今没有任何人可以回答,全部都是可以啊,行啊,没问题啊
    没有任何代码证明我的信箱是 [email protected]
    收到可行代码立刻结贴送分
    http://community.csdn.net/Expert/topic/3638/3638776.xml?temp=.6011927
    http://community.csdn.net/Expert/topic/3637/3637320.xml?temp=.0927698
    http://community.csdn.net/Expert/topic/3638/3638807.xml?temp=.9520227
    http://community.csdn.net/Expert/topic/3638/3638773.xml?temp=.4013636
      

  4.   

    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance(); 
    String url ="jdbc:mysql://localhost/test?user=root&password=root&useUnicode=true&characterEncoding=gbk"; 

    Connection conn = DriverManager.getConnection(url);
    Statement stmt =
    conn.createStatement();
    stmt.execute("insert into test(myid) values (5)");
    stmt.close();
    PreparedStatement pstmt = null;
    String sql = "";
    File file = new File("c:\\kick.jpg");
    InputStream photoStream = new FileInputStream(file);
    sql = " UPDATE test SET photo = ? "
    + " WHERE myid = 5" ;

    pstmt = conn.prepareStatement(sql);
    pstmt.setBinaryStream(1, photoStream, (int)file.length());
    pstmt.executeUpdate();
    pstmt.close();

    conn.close();
    } catch (Exception e) {
    e.printStackTrace();
    }
      

  5.   

    我用yahoo和sohu的发了过去。