How I can connect to SQL Server from My Mobile Application iOS Objective-C.
I got sample code for Android i.e
public void ConnectToDatabase(){
try {
// SET CONNECTIONSTRING
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
String username = "XXXXXXXXX";
String password = "XXXXXX";
Connection DbConn = DriverManager.getConnection("jdbc:jtds:sqlserver://192.188.4.83:1433/DATABASE;user=" + username + ";password=" + password);
Log.w("Connection","open");
Statement stmt = DbConn.createStatement();
ResultSet reset = stmt.executeQuery(" select * from users ");
EditText num = (EditText) findViewById(R.id.displaymessage);
num.setText(reset.getString(1));
DbConn.close();
} catch (Exception e)
{
Log.w("Error connection","" + e.getMessage());
}
}
Please help me integrate the connextion in Objective-C as well.