
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »Waterpolo« (14. April 2012, 14:36)
Zitat
`familydate` date NOT NULL
`famcheckdate` date NOT NULL
`famcheck` tinyint(3) unsigned NOT NULL DEFAULT '0'
Sorry wenn ich das nochmal hoch hole aber wenn ich jetzt versuche die Datenbank mit genau dem was dort steht zu füttern und dies einzubauen kommt folgender fehler bei raus:
Zitat
`fam` varchar(11) NOT NULL
wie kann ich das abändern ?
Zitat
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near '`familydate` date NOT NULL
`famcheckdate` date NOT NULL
`famcheck` tinyint(3' at line 2
und hier der dazu gehörige code teil:
Zitat
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:64: error: incompatible types
} catch (SQLException e) {
required: Throwable
found: SQLException
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:65: error: cannot find symbol
e.printStackTrace();
symbol: method printStackTrace()
location: variable e of type SQLException
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:70: error: incompatible types
} catch (SQLException e) {
required: Throwable
found: SQLException
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:95: error: incompatible types
} catch (SQLException e) {
required: Throwable
found: SQLException
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:96: error: cannot find symbol
e.printStackTrace();
symbol: method printStackTrace()
location: variable e of type SQLException
C:\Users\Passion\Desktop\src\handler\LeaveChannelHandler.java:101: error: incompatible types
} catch (SQLException e) {
required: Throwable
found: SQLException
6 errors
C:\Users\Passion\Documents\NetBeansProjects\bananachat\nbproject\build-impl.xml:900: The following error occurred while executing this line:
C:\Users\Passion\Documents\NetBeansProjects\bananachat\nbproject\build-impl.xml:265: Compile failed; see the compiler error output for details.
ERSTELLEN FEHLGESCHLAGEN (Gesamtzeit: 0 Minuten 0 Sekunden)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
try {
Connection con = pcon.connect();
ps = con.prepareStatement("UPDATE `accounts` SET `rank` = ?, `familydate` = ?, `famcheck` = ?, `famcheckdate` = ?, `monatstime` = ? WHERE `name` = ?");
ps.setString(1, "1");
ps.setString(2, new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
ps.setString(3, "1");
ps.setString(4, new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
ps.setInt(5, client.getOnlineTime());
ps.setString(6, client.getName());
ps.executeUpdate();
} catch (SQLException e) {
e.printStackTrace();
} finally {
if (ps != null) {
try {
ps.close();
} catch (SQLException e) {
}
}
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Maldohr« (28. März 2013, 04:49)