Hi,
I am inserting data in Sql server successfully from my app in debug mode but
it is neither working in release mode nor in a mobile device... I have
checked the dlls in .apk by extracting it and there are all the dlls which I
have added in my app. Here is my code:
protected void addUser(int id, string fbId, string name, string usrName,
string mail, string dob, int isExist)
{
string conStr =
SqlServerString.ConnectionString("192.168.1.12", "yRepublic", "cjYummy",
"dbyummy#02");
//string conStr =
SqlServerString.ConnectionString("118.139.161.115", "yRepublic", "cjYummy",
"dbyummy#02");
SqlConnection conn = new SqlConnection(conStr);
//try {
conn.Open();
SqlCommand cmd = new SqlCommand("Users_Insert", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@Id",
SqlDbType.Int, 4)).Direction = ParameterDirection.Output;
cmd.Parameters.AddWithValue("@FacebookId", fbId);
cmd.Parameters.AddWithValue("@Name", name);
cmd.Parameters.AddWithValue("@UserName", usrName);
cmd.Parameters.AddWithValue("@Email", mail);
cmd.Parameters.AddWithValue("@BornOn", dob);
cmd.Parameters.Add(new SqlParameter("@IsExist",
SqlDbType.TinyInt,1)).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
id = (int)(cmd.Parameters["@Id"].Value);
isExist =
Convert.ToInt32(cmd.Parameters["@IsExist"].Value);
/*}
catch (Exception ex)
{
parent.hText.Text += "Facebook error: " +
ex.Message.ToString();
Log.Warn(hTAG, ex.Message);
} finally { //*/
conn.Close();
//conn.Dispose();
//conn = null;
//}
}
-----
Thanks & Regards,
Hem Singh
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/problem-inserting-data-in-Sql-Server-in-release-mode-tp5712057.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid