有人能告诉我为什么如果我尝试使用此代码连接到数据库会出现错误吗?
conn = DriverManager.getConnection("jdbc:" + this.dbms +"://" + this.serverName +":" + this.portNumber +"/" + this.dbName, connectionProps);
con.close();
conn = DriverManager.getConnection("jdbc:" + this.dbms +"://" + this.serverName +":" + this.portNumber +"/" + this.dbName, connectionProps);
当我只输入第一行时,一切正常,我可以连接到数据库,但是如果我尝试使用所有 3 行重新连接,则会出现错误:
resultset is from update. no data