eclipseÁ¬½ÓmysqlÊý¾Ý¿â - Java / Eclipse
ÏÈÉÏ´íÎó
ÎÞ·¨Áª½ÓÊý¾Ý¿â
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:720)
at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5624)
at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5544)
ÎÒÓÃeclipseÁ¬½ÓmysqlÊý¾Ý¿â
±¾µØÓÐmysqlÊý¾Ý¿â
ÒѾ¼ÓÔØÇý¶¯¡£
´úÂëÈçÏ ºÜ¼òµ¥
package test;
import java.sql.*;
public class Conn {
public static void main(String[] args) {
String username = "root";
String password = "root";
String url = "jdbc:mysql://127.0.0.1:3306/mysql";
try {
String driver = "com.mysql.jdbc.Driver";
Class.forName(driver);
java.sql.Connection cn = DriverManager.getConnection(url, username, password);
} catch (ClassNotFoundException cnfex) {
System.out.println("×°ÔØJDBC/ODBC Çý¶¯³ÌÐòʧ°Ü");
cnfex.printStackTrace();
} catch (SQLException sqlex) {
System.out.println("ÎÞ·¨Áª½ÓÊý¾Ý¿â");
sqlex.printStackTrace();
} catch (Exception ex) {
System.out.println("NoClassDefException");
ex.printStackTrac
Ïà¹ØÎÊ´ð£º
ÎÒÏëÓÃJavaдһ¸ö³ÌÐò£¬¾ÍÊÇÎÒÏëÔÚÔËÐдúÂëºó£¬ÔÚÖ¸¶¨µÄʱ¼ä´ò¿ªÄ³³ÌÐò£¬ÀýÈçÎÒÔËÐдúÂëºó£¬½²ÔÚ12£º00´ò¿ª"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"Õâ¸ö³ÌÐò£¬Çó¸ßÈËÖ¸µã¡£»¹ÓпÉÄܵĻ°ÔÚÖ¸¶¨µÄʱ¼ä ......
ÎÒÏ£ÍûÔÚ±à¼ÎÄ×Öºó°Ñ·¢Ëͼü¸Äµ½ÆÁÄ»Öм䣬¾ßÌå˵¾ÍÊÇ
ÔÚkb.classÖеIJ¿·Ö×÷³öÐÞ¸Ä
²¿·Ö´úÂ룺
V = new TextBox(ld.a(383), "", 190, 0);
X = new Comma ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
private static final String USERNAME = "sys";
private static final String PASSWORD = "s ......
ÄÄλÀÏ´óÓбȽϺõķÖÒ³¿Ø¼þ»òÕß´úÂë!
ÒªÇó ¿ÉÒÔÏÔʾ×ÜÒ³Êý.»ù±¾µÄÉÏÏ·ҳ.
Êý¾Ý¿âΪOracle
±íÊý¾ÝÁ¿ÓÐ300Íò×óÓÒ ËùÒÔÏÖÔÚÎҵķÖҳЧÂÊÌ«ÂýÁË.
Ï£ÍûÀÏ´óÃÇÄÜÌṩ¸ü¿ ......