-2
我得到一個錯誤來連接MS Sql。你能幫我找到錯誤,這是我的代碼:Android和MS Sql Conncetion
@SuppressLint("NewApi")
public void SqlConnectTest(View view)
{
Log.i("Android"," SQL Connect Example.");
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
Connection conn = null;
try {
//String driver = "net.sourceforge.jtds.jdbc.Driver";
//"net.sourceforge.jtds.jdbc.Driver"
//Class.forName(driver);
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
Log.i("Android"," SQL Class Connect Example.");
我得到這個警告,然後停止執行。
04-02 10:33:40.002: W/Error connection(1646): net.sourceforge.jtds.jdbc.Driver
...你有一個題? –