Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bacem smari

@bacem smari
About
Posts
17
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • using listview control in smart device
    B bacem smari

    thank you. I know the command. I just want these 3 columns.

    C# question

  • using listview control in smart device
    B bacem smari

    thank you for the information. I think that you didn't understand my code very well. it's the datatable that i am getting the columns form. every column must appear on the listview. Can you help me? thank you.

    C# question

  • using listview control in smart device
    B bacem smari

    Hi , This is the code that i am using. It indicates no errors but my listview isn't filled with the result of the querry. Can you help me.

    private void button1_Click(object sender, EventArgs e)
    {
    string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
    SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
    SqlCeCommand command = sqlceconn.CreateCommand();
    command.CommandText = "SELECT [ID],[Magasin],[qtyonhand] from stocks where ID like @txt";
    SqlCeDataAdapter adapter = new SqlCeDataAdapter(command);
    SqlCeParameter txt = new SqlCeParameter("@txt", SqlDbType.NVarChar);
    txt.Value = textBox1.Text;
    command.Parameters.Add(txt);
    DataSet ds = new DataSet();
    adapter.Fill(ds);
    string[] str = new string[ds.Tables[0].Columns.Count];
    foreach (DataRow dr in ds.Tables[0].Rows)
    {
    for (int col = 0; col <= ds.Tables[0].Columns.Count-1; col++)
    {
    //filling the array of string
    str[col] = dr[col].ToString();
    }
    ListViewItem ii;
    ii = new ListViewItem(str);
    this.listView1.Items.Add(ii);
    }

        }
    
    C# question

  • using listview control in smart device
    B bacem smari

    hi, thank you but i am trying to fill the listview with the result of a querry. Can you help me?

    C# question

  • using listview control in smart device
    B bacem smari

    hi everybody, I am trying to create a multicolumn listview knowing that it is not possible to do with a listbox I have 2 questions: the first is how can i display the header of the columns? the second is how can i get data from a data base .sdf and display it on the colomuns of my listview? Thank you in advance

    C# question

  • Multicolumn listbox in smart device application
    B bacem smari

    Good morning, I am working on a smart device application. I want to create a listbox with 3 columns which get there data from a local database .sdf I tried the following code but an exception occurred.

    private void button1_Click(object sender, EventArgs e)
    {
    string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
    SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
    SqlCeCommand command = sqlceconn.CreateCommand();
    command.CommandText = "SELECT [ID]+\" \"+[Magasin]+\" \"+ [qtyonhand] AS IMQ from stocks where ID like %@txt%";
    SqlCeDataAdapter adapter = new SqlCeDataAdapter(command);
    SqlCeParameter txt = new SqlCeParameter("@txt", SqlDbType.NVarChar);
    txt.Value= textBox1.Text;
    command.Parameters.Add(txt);
    DataSet ds = new DataSet();
    adapter.Fill(ds);
    listBox1.DataSource = ds.Tables[0];
    listBox1.DisplayMember="IMQ";
    }

    this is the exception

    there is an error parsing the querry. [token line number =1, token line offset=77, Token in error = %]

    thank you in advance.

    C# database json help

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    i open the table from visual studio after closing the application and i check if there is a new line inserted.

    C# help com tutorial

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    the error was repaired but nothing happened in data base. There is is no line inserted.

    C# help com tutorial

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    thank you but for the line:

    SqlCeCommand command2 = sqlceconn.CreateCommand(insertString,sqlceconn);

    the following error occurs: Error 1 No overload for method 'CreateCommand' takes '2' arguments C:\Users\Admin\Documents\Visual Studio 2008\Projects\GMAOMobile\ModeDifféré\Energie.cs 107 41 ModeDifféré what is the problem?

    C# help com tutorial

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    this is the code:

    private void menuItem4_Click(object sender, EventArgs e)
    {
    DateTime t = DateTime.Now;
    string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
    SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
    SqlCeCommand command2 = sqlceconn.CreateCommand();
    command2.CommandText = "INSERT INTO compteurs2 ([com], [quantite],[datequantite] ) Values(@com,@qtte,@dat)";

            //Add the parameters
            SqlCeParameter com = new SqlCeParameter("@com", SqlDbType.NVarChar);
            com.Value = comComboBox.SelectedItem.ToString();
    
            command2.Parameters.Add(com);
            SqlCeParameter qtte = new SqlCeParameter("@qtte", SqlDbType.Float);
            qtte.Value = float.Parse(textBox1.Text);
    
            command2.Parameters.Add(com);
            SqlCeParameter dat = new SqlCeParameter("@dat", SqlDbType.Float);
            dat.Value = t;
    
            command2.Parameters.Add(dat);
            command2.ExecuteNonQuery();
        }
    

    and i didn't see any exception.

    C# help com tutorial

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    thank you for your suggestion but it still doesn't work.

    C# help com tutorial

  • how to insert a new line in a table of a .sdf file smart device application
    B bacem smari

    Hi everybody, I am trying a smart device application. the problem is after i execute a querry that should insert a new line in a table, i go to check if the line existe really in the table then i don't find it. this is the code i used. Thank you for your help in advance.

    private void menuItem4_Click(object sender, EventArgs e)
    {
    string wCS = @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;";
    SqlCeConnection sqlceconn = new SqlCeConnection(wCS);
    SqlCeCommand command2 = sqlceconn.CreateCommand();
    command2.CommandText = "INSERT INTO compteurs2 ([com], [quantite],[datequantite] ) Values(@com,@qtte,SYSDATE)";
    command2.ExecuteNonQuery();

            //Add the parameters
            SqlCeParameter com = new SqlCeParameter("@com", SqlDbType.NVarChar);
            com.Value = comComboBox.SelectedItem.ToString();
    
            command2.Parameters.Add(com);
            SqlCeParameter qtte = new SqlCeParameter("@qtte", SqlDbType.Float);
            qtte.Value = float.Parse(textBox1.Text);
    
            command2.Parameters.Add(qtte);
        }
    
    C# help com tutorial

  • sending the value of a parameter in a form to another form smart device
    B bacem smari

    thank you for your help, But i am working on a mobile application and it is not a web application. I found finallay the solution for the problem. It was very simple: add a parameter to the constructor of the form and call it with this parameter.

    C# csharp help question

  • sending the value of a parameter in a form to another form smart device
    B bacem smari

    Hi; i am working on a mobile application with csharp. I want to know how can i use a parameter related to a form in another form. what can i do. thank you for your help.

    C# csharp help question

  • Storage card in the emulator
    B bacem smari

    thanks to tunisien86 that gave an idea to solve the problem this is the link you can see it if you have problems. thank you. http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/0f32993e-5b16-43b4-b7b6-09a3f66eb2f2/

    C# help question database

  • Storage card in the emulator
    B bacem smari

    Hi, I think that you gave me the idea without precision and i thank you. However i don't know how to do it. Can you show me how to do the copy please. thank you in advance. :sigh:

    C# help question database

  • Storage card in the emulator
    B bacem smari

    Hi, I am a novice in developing mobile applications. The problem is with my mobile database which is saved in the storage card of the emulator. When i execute my program the following error occurs:

    Acces to the database file is not allowed. [File name = \Storage Card\ModeDifféré\BaseGmaoLocale.sdf]

    I have to keep you informed that the connexion string that i made is the following

    @"Data Source =\Storage Card\ModeDifféré\BaseGmaoLocale.sdf;"

    So what is the problem. How can i process to solve this problem. thank you for your help.

    C# help question database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups