我的JDBC代码抛出java.lang.UnsupportedOperationException:尚不支持

问题描述 投票:-1回答:1

我正在尝试对MySQL数据库执行一些JDBC代码,但它向我显示一个错误:

java.lang.UnsupportedOperationException: Not supported Yet. 

我的代码:

public Custmor getUserByEmailAndPassword(String email,String password)
{
    Custmor cst=null;

    try
    {
        String query="select *from custmor where email=? and password=?";
        PreparedStatement pstmt=con.prepareStatement(query);
        pstmt.setString(1, email);
        pstmt.setString(2, password);
        ResultSet set=pstmt.executeQuery();
        if(set.next())
        {
            cst=new Custmor();
            cst.setId(set.getInt("id"));
            cst.setName(set.getString("name"));
            cst.setEmail(set.getString("email"));
            cst.setPassword(set.getString("password"));
            cst.setMob_no(set.getString("mob_no"));
            cst.setGender(set.getString("gender"));



        }
    }catch(Exception e)
    {
        System.out.println("Error while Loging:"+e);
    }
    return cst; 
}

如何解决此错误?

java jdbc unsupportedoperation
1个回答
0
投票

看起来像语法错误。查看您的查询

© www.soinside.com 2019 - 2024. All rights reserved.