when i call this function gives me error like this.
i tried both functions
ResultSet result = statement.executeUpdate();
and
ResultSet result = statement.executeQuery();
and same reaction on both scropts
Oct 13, 2012 9:45:18 PM com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager showBuffMainPage
WARNING: Could get data from character:
java.sql.SQLException: Can not issue executeUpdate() for SELECTs
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2412)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:477)
at com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager.showBuffMainPage(BuffBBSManager.java:129)
at com.l2jserver.gameserver.communitybbs.Manager.BuffBBSManager.parsecmd(BuffBBSManager.java:38)
at com.l2jserver.gameserver.communitybbs.CommunityBoard.handleCommands(CommunityBoard.java:59)
at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:234)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:60)
at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1073)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
private void showBuffMainPage(L2PcInstance activeChar)
{
try(Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement("SELECT * FROM character_bbs_buff_save WHERE charId=?");
statement.setInt(1, activeChar.getObjectId());
ResultSet result = statement.executeUpdate();
TextBuilder html = new TextBuilder();
html.append("<table width=220>");
while (result.next())
{
String name = result.getString("scheme_name");
html.append("<tr>");
html.append("<td>");
if (name.equals(null))
{
html.append("No Scheme");
}
else
{
html.append("<button value=\"" + name + "\" action=\"bypass _bbsbuff;use;" + name + "\" width=190 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
}
html.append("</td>");
html.append("</tr>");
}
html.append("</table>");
result.close();
statement.close();
String content = HtmCache.getInstance().getHtmForce(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/buffer.htm");
content = content.replace("%scheme_list%", html.toString());
separateAndSend(content, activeChar);
}
catch (Exception e)
{
_log.log(Level.WARNING, "Could get data from character: ", e);
}
}
The server these videos are posted on is mine, and the topic owner undoubtedly doesn't own it. First, because no one has access to my source code, and second, because no one has access to my datapack with the server installed. Be careful, it could be a copy of my project. But it's 100% not the original, as I own it.
The owner of this server is a crook. I made the server for him, and he simply refused to pay me the remaining amount. The server is online; no problem, you can access it through this link. I'm selling the server complete with the code, so count on the amount this scammer refused to pay me.
Info Server : Features - Blood & Sand
Price: 500$ USD ( Only 1 person can buy )
Base Project ( aCis 410 )
Comes with Server Sourcer and Interface Sourcer
All GrandBoss is working perfectly like l2off
Question
janiko
when i call this function gives me error like this.
i tried both functions
ResultSet result = statement.executeUpdate();
and
ResultSet result = statement.executeQuery();
and same reaction on both scropts
2 answers to this question
Recommended Posts