Hi,
I downloaded JDBC driver from microsoft.com
(sqljdbc_3.0.1301.101_enu.exe), and use sqljdbc4.jar file in my code,
to connect with MS SQL 2005 Express.

I wrote very simple code. It provides exception while doing
getConnection().
************************
String driver= "com.microsoft.sqlserver.jdbc.SQLServerDriver"; //
Start JDBC
String dbURL = "jdbc:sqlserver://192.168.1.2\
\sqlexpress;databaseName=dbname;encrypt=true;trustServerCertificate=false";
String user="sa",pass="abc@123";
java.sql.Connection dbConn = null;
try
{
    Class.forName(driver);
        dbConn = DriverManager.getConnection(dbURL,user,pass);
        dbConn.close();
}
catch (Exception e)
{
    e.printStackTrace();
}
**********************
code is working properly when it is run from windows system.
On android system,
"class.forname(driver);" is working properly.
"getconnection()" function fails; it throws exception that
"com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not
establish a secure connection to SQL Server by using Secure Sockets
Layer (SSL) encryption. Error: "Unable to make socket non blocking"."

Can you please help into this?

Thanks
Niket

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to