hello,everyone,
I am using JDBC in JSP to connect with MySQL under BEA WEBLOgic Server 6.0,
I have copied the following codes from a book, but the server always says that
It was wrong, expecial the variable "con", I don't know why even thinking hard!
please help,thanks.
the code following:
==================
<HTML>
<BODY>
<% Properties P = System.getProperties();
P.put("jdbc.drivers", "org.gjt.mm.mysql.Driver");
System.setProperties(P);
Java.sql.connection
con=DriverManager.getConnection("JDBC:MySQL://localhost:3306","root","root");
Java.sql.Statement Stmt = con.createStatement();
Stmt.executeUpdate("INSERT INTO table1 (col1, col2) VALUES (1054,Whatis)");
%>
</BODY>
</HTML>
====================
aDragon from China
[EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php