![]() ResultSet rs = stmt.executeQuery("SELECT * FROM members ORDER BY id DESC") įtText("error: " + e. I am very new to java, here is my source code below:Ĭonnection con = DriverManager.getConnection("jdbc:mysql://table","username","password") I'm not sure if the error is in my code, or the way I have the server running. Copy the mysql-connector-java-5.x.xxmysql-connector-java-5.x.xx-bin.jar file to the /bin/ext.To install the driver, do the following: Download the mysql-connector archive. I am running WinXP and Apache, with j2sdk1.4.2_04. The MySQL JDBC driver provides connections for MySQL databases. ![]() : com/mysql/jdbc/Driver (Bad magic number)Īt 0(Native Method)Īt (Unknown Source)Īt (Unknown Source)Īt (Unknown Source)Īt (Unknown Source)Īt (Unknown Source)Īt (Unknown Source)Īt 0(Native Method)Īt (Unknown Source)Īt (Unknown Source) ![]() But when I try and connect to the database from an applet, I get the following error: Type-3 driver or Network Protocol driver. There are 4 types of JDBC drivers: Type-1 driver or JDBC-ODBC bridge driver. I know this for a fact because when I create an actual java 'application' and run a query, It works fine and I get the desired result. JDBC drivers are client-side adapters (installed on the client machine, not on the server) that convert requests from Java programs to a protocol that the DBMS can understand. I am trying to connect to a MySQL database using java, I have successfully installed the jdbc driver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |