|
Hi world,
i am using this code to get info from my sql server 2008.
this is working well in "Debug" mode but cannot run app in mobile(only release work for mobile) SO when i wanna to (Release mode) release it (.apk) and send to my samsung android mobile ,and when i run the app and click on button i get error :
Unhandled Exception CODEPAGE="1256″ not supported
i think it doesnt support
IDbConnection in Release !
and my code is :
void button_Click(object sender, EventArgs e)
{
TextView txts = FindViewById<TextView>(Resource.Id.txt);
txts.Text = "Salam Ali Joon !";
string namess = "";
string connectionString = "Server=217.66.216.77,1633;" +
"Database=testinDB;" + "User ID=testing;" + "Password=arew;";
try
{
IDbConnection dbcon;
using (dbcon = new SqlConnection(connectionString))
{
dbcon.Open();
using (IDbCommand dbcmd = dbcon.CreateCommand())
{
string sql = " SELECT * " +
" FROM persons.[user] ";
dbcmd.CommandText = sql;
using (IDataReader reader = dbcmd.ExecuteReader())
{
while (reader.Read())
{
string FirstName = (string)reader["UserName"];
namess = "user name is : " + FirstName;
}
reader.Close();
dbcon.Close();
}
}
}
txts.Text = namess;
}
catch (Exception ex)
{
txts.Text = ex.Message;
}
}
HELP Please !
|
|
|
|
|
The <mandroidi18n> entry goes into the .csproj, not AndroidManifest.xml.
This can also be set in the IDE.
In MonoDevelop:
Click Project > Project Name Options.
In the left-hand tree, select Build > Mono for Android Build.
In the right-hand pane, select the Advanced tab.
In the Internationalization section, click the checkbox next to west.
Note: Make sure you're changing options for your Release build, not the Debug build.
Within Visual Studio:
Click Project > Project Name Properties.
In the Application tab, look in the Application properties > Additional supported encodings section (it's on the right).
Click the checkbox next to West.
|
|
|
|