-1

SQL サーバー 2008 で作成したローカル DB に接続しようとしていますが、すべてを試しましたが、同じエラーが表示されます。データベース エクスプローラーで接続していますが、登録ページとログインのためにアプリから DB に接続する必要があります。これは私のエラーです:

    #
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3470), pid=5644, tid=5492
#  Error: ShouldNotReachHere()
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\christiej\workspace\MainActivity\hs_err_pid5644.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

これが私のコードです:

    public class Example
{
   public static void main (String[] args) throws SQLException, ClassNotFoundException{

   Class.forName("com.sqlserver.jdbc.Driver"); // Setup the connection with the DB

   Connection connect = DriverManager.getConnection("jdbc:sqlserver://192.168.0.13:1433/Risk_ProfilingV2","sa","Dsolve01#");  

 // Statements allow to issue SQL queries to the database
    java.sql.Statement statement = connect.createStatement();

 // Result set get the result of the SQL query
 ResultSet resultSet = null;
try {
    resultSet = statement.executeQuery("select * from User_Table");
} catch (SQLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

     while (resultSet.next()) {  //retrieve data
         String data = resultSet.getString("User_Name");

      }
}

}

4

1 に答える 1

0

this similar queestion has a useful-looking answer : Fatal error by Java runtime environment

which points to this page : http://dtmilano.blogspot.com/2008/11/android-testing-on-android-platform.html

于 2013-01-03T12:46:45.377 に答える