Click here to Skip to main content
16,014,765 members
Home / Discussions / C#
   

C#

 
AnswerRe: Critical Problem : MyTableAdapter.Adapter.SelectCommand is null. Pin
Abhinav S12-May-10 5:28
Abhinav S12-May-10 5:28 
GeneralRe: Critical Problem : MyTableAdapter.Adapter.SelectCommand is null. Pin
hdv21212-May-10 8:10
hdv21212-May-10 8:10 
QuestionESP error when calling C# from Unmanaged C++ Pin
mtnM@n12-May-10 3:54
mtnM@n12-May-10 3:54 
AnswerRe: ESP error when calling C# from Unmanaged C++ Pin
Luc Pattyn12-May-10 4:17
sitebuilderLuc Pattyn12-May-10 4:17 
Questionusing listview control in smart device Pin
bacem smari12-May-10 3:14
bacem smari12-May-10 3:14 
AnswerRe: using listview control in smart device Pin
William Winner12-May-10 6:05
William Winner12-May-10 6:05 
GeneralRe: using listview control in smart device Pin
bacem smari12-May-10 12:53
bacem smari12-May-10 12:53 
GeneralRe: using listview control in smart device Pin
bacem smari13-May-10 0:29
bacem smari13-May-10 0:29 
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);
            }

        }

GeneralRe: using listview control in smart device Pin
William Winner13-May-10 5:25
William Winner13-May-10 5:25 
GeneralRe: using listview control in smart device Pin
bacem smari13-May-10 6:13
bacem smari13-May-10 6:13 
GeneralRe: using listview control in smart device Pin
William Winner13-May-10 6:49
William Winner13-May-10 6:49 
GeneralRe: using listview control in smart device Pin
bacem smari13-May-10 7:52
bacem smari13-May-10 7:52 
Questionerror Exception from HRESULT: 0x80040218 Pin
canhoi12-May-10 3:10
canhoi12-May-10 3:10 
AnswerRe: error Exception from HRESULT: 0x80040218 Pin
William Winner12-May-10 6:07
William Winner12-May-10 6:07 
JokeRe: error Exception from HRESULT: 0x80040218 Pin
Michel Godfroid12-May-10 9:56
Michel Godfroid12-May-10 9:56 
AnswerRe: error Exception from HRESULT: 0x80040218 Pin
canhoi12-May-10 16:56
canhoi12-May-10 16:56 
QuestionMessage Removed Pin
12-May-10 1:18
Jordy "Kaiwa" Ruiter12-May-10 1:18 
AnswerRe: So, what now? Pin
Pete O'Hanlon12-May-10 1:33
mvePete O'Hanlon12-May-10 1:33 
GeneralRe: So, what now? Pin
Jordy "Kaiwa" Ruiter12-May-10 1:47
Jordy "Kaiwa" Ruiter12-May-10 1:47 
GeneralRe: So, what now? Pin
Not Active12-May-10 7:29
mentorNot Active12-May-10 7:29 
GeneralRe: So, what now? Pin
Jordy "Kaiwa" Ruiter12-May-10 10:29
Jordy "Kaiwa" Ruiter12-May-10 10:29 
QuestionSOAP request/response messages in WCF Pin
Gktony12-May-10 1:02
Gktony12-May-10 1:02 
AnswerRe: SOAP request/response messages in WCF Pin
Abhinav S12-May-10 1:08
Abhinav S12-May-10 1:08 
Questionaccessing events Pin
i gr812-May-10 0:49
i gr812-May-10 0:49 
AnswerRe: accessing events Pin
OriginalGriff12-May-10 1:24
mveOriginalGriff12-May-10 1:24 

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.