Click here to Skip to main content
15,895,084 members
Home / Discussions / Mobile
   

Mobile

 
QuestionHow can I display Bengali language font for Pcket PC Pin
Md. Ali Naser Khan7-May-09 1:54
Md. Ali Naser Khan7-May-09 1:54 
AnswerRe: How can I display Bengali language font for Pcket PC Pin
Joel Ivory Johnson7-May-09 12:54
professionalJoel Ivory Johnson7-May-09 12:54 
QuestionHow to enumerate all the window handles in WM6(C#)? Pin
ujjawal kumar6-May-09 23:48
ujjawal kumar6-May-09 23:48 
AnswerRe: How to enumerate all the window handles in WM6(C#)? Pin
sivaddrahcir28-May-09 8:57
sivaddrahcir28-May-09 8:57 
QuestionWrong date/time Pin
Pryzrak6-May-09 2:21
Pryzrak6-May-09 2:21 
AnswerRe: Wrong date/time Pin
Joel Ivory Johnson9-May-09 8:22
professionalJoel Ivory Johnson9-May-09 8:22 
GeneralRe: Wrong date/time Pin
Pryzrak9-May-09 23:12
Pryzrak9-May-09 23:12 
Questionhelp sql CE update problem Pin
zigzagooo5-May-09 23:05
zigzagooo5-May-09 23:05 
the problem that my code does the update during the same run while iam out and run again i find nothing of the updates i think it's a comminting problem anyway hope anyone help me!!
plz check the code:

public partial class Form1 : Form
    {
       static SqlCeConnection _connection = null;
       public static SqlCeConnection Connection
        {
            get
            {
                if (_connection == null)
                {
                    _connection = new SqlCeConnection(ConnectionString);
                    _connection.Open();
                }
                return _connection;
            }
        }
        public Form1()
        {
            InitializeComponent();
        }
        public static DataSet ds = new DataSet();
        public static int rowindex = -1;
        private void menuExit_Click(object sender, EventArgs e)
        {
            Close();
        }
    

        #region File & Database Details

       static string CurrentFolder
        {
            get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); }
        }

        const string _databaseLocalFileName = "DB1.sdf";
       static string DatabasePathName
        {
            get { return Path.Combine(CurrentFolder, _databaseLocalFileName); }
        }

        const string _baseConnectionString = "Data Source =";
       static string ConnectionString
        {
            get { return _baseConnectionString + DatabasePathName; }
        }

        #endregion

        private void menuedit_Click(object sender, EventArgs e)
        {          
            rowindex = dataGrid1.CurrentRowIndex;
            if (dataGrid1.DataSource != null)
            {
                panel1.Visible = true;
                txtcol1.Text = ds.Tables[0].Rows[rowindex].ItemArray[0].ToString();
                txtcol2.Text = ds.Tables[0].Rows[rowindex].ItemArray[1].ToString();
                txttblID.Text = ds.Tables[0].Rows[rowindex].ItemArray[2].ToString();
            }
            else
                MessageBox.Show("should load data grid first", "error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
        }
        public static SqlCeDataAdapter adap;
        

        private void btnsave_Click_1(object sender, EventArgs e)
        {
            try
            {
                SqlCeCommand cmdUpdate = Connection.CreateCommand();
                SqlCeTransaction se = Connection.BeginTransaction();
                cmdUpdate.CommandType = CommandType.Text;
                cmdUpdate.CommandText = "UPDATE tbl SET Col1=@Col1, Col2=@Col2 where tblID = @tblID";
                cmdUpdate.Parameters.AddWithValue("@Col1", txtcol1.Text);
                cmdUpdate.Parameters.AddWithValue("@Col2", txtcol2.Text);
                cmdUpdate.Parameters.AddWithValue("@tblID", txttblID.Text);
                if (Connection.State != ConnectionState.Open)
                {
                    Connection.Open();
                }
                cmdUpdate.Transaction = se;
                cmdUpdate.ExecuteScalar();
                se.Commit(CommitMode.Immediate);
                Connection.Close();
                panel1.Visible = false;
                menuItem1_Click(null, null);
            }
            catch (SqlCeException ex)
            {
                throw ex;
            }
        }

        private void menuLoad_Click(object sender, EventArgs e)
        {
            try
            {
                SqlCeCommand com = new SqlCeCommand("Select * from Tbl ", Connection);
                adap = new SqlCeDataAdapter(com);
                if (ds.Tables.Count > 0)
                {
                    ds.Tables["tbl"].Clear();
                }
                adap.Fill(ds, "tbl");
                dataGrid1.DataSource = ds.Tables[0];
                adap.Dispose();
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }       
    }

QuestionAlignment of mobile controls in mobile form (asp.net) Pin
sunilkumarsomani3-May-09 22:20
sunilkumarsomani3-May-09 22:20 
QuestionAdd SelectionList in ObjectList in mobile form (asp.net) Pin
sunilkumarsomani3-May-09 22:15
sunilkumarsomani3-May-09 22:15 
Questionshow page according to mobile secreen in mobile form ( asp.net) Pin
sunilkumarsomani3-May-09 22:13
sunilkumarsomani3-May-09 22:13 
AnswerRe: show page according to mobile secreen in mobile form ( asp.net) Pin
saadhanif6-May-09 23:34
saadhanif6-May-09 23:34 
QuestionDeveloping applications in C# for Blackberry Pin
SimpleData3-May-09 4:56
SimpleData3-May-09 4:56 
AnswerRe: Developing applications in C# for Blackberry Pin
Joel Ivory Johnson4-May-09 3:54
professionalJoel Ivory Johnson4-May-09 3:54 
QuestionRe: Developing applications in C# for Blackberry Pin
Johann Lazarus6-Feb-10 19:41
Johann Lazarus6-Feb-10 19:41 
QuestionChange Wallpaper in Pocket PC Pin
Nirmit Kavaiya2-May-09 21:06
professionalNirmit Kavaiya2-May-09 21:06 
AnswerRe: Change Wallpaper in Pocket PC Pin
energywave8-May-09 13:26
energywave8-May-09 13:26 
GeneralRe: Change Wallpaper in Pocket PC Pin
Nirmit Kavaiya10-May-09 20:18
professionalNirmit Kavaiya10-May-09 20:18 
QuestionAuto Answer Phone call Pin
Silva_A2-May-09 0:59
Silva_A2-May-09 0:59 
AnswerRe: Auto Answer Phone call Pin
Joel Ivory Johnson4-May-09 3:55
professionalJoel Ivory Johnson4-May-09 3:55 
QuestionSQL CE app, problems only while debugging, works when launched from device Pin
mdurli30-Apr-09 1:12
mdurli30-Apr-09 1:12 
QuestionCamera Pin
2_Raptor_229-Apr-09 17:41
2_Raptor_229-Apr-09 17:41 
AnswerRe: Camera Pin
~Khatri Mitesh~29-Apr-09 21:00
~Khatri Mitesh~29-Apr-09 21:00 
AnswerRe: Camera Pin
Jabbar_espania30-Apr-09 2:02
Jabbar_espania30-Apr-09 2:02 
GeneralRe: Camera Pin
2_Raptor_230-Apr-09 12:22
2_Raptor_230-Apr-09 12:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.