Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to disable event handler from its execution Pin
Stanciu Vlad12-May-10 20:02
Stanciu Vlad12-May-10 20:02 
QuestionISP Bandwidth Measure [modified] Pin
Omoniyi Ogunderu11-May-10 23:20
Omoniyi Ogunderu11-May-10 23:20 
AnswerRe: ISP Bandwidth Measure Pin
OriginalGriff11-May-10 23:22
mveOriginalGriff11-May-10 23:22 
GeneralRe: ISP Bandwidth Measure Pin
Omoniyi Ogunderu11-May-10 23:39
Omoniyi Ogunderu11-May-10 23:39 
AnswerRe: ISP Bandwidth Measure Pin
Michel Godfroid11-May-10 23:54
Michel Godfroid11-May-10 23:54 
AnswerRe: ISP Bandwidth Measure Pin
Bernhard Hiller12-May-10 3:23
Bernhard Hiller12-May-10 3:23 
GeneralRe: ISP Bandwidth Measure Pin
harold aptroot12-May-10 3:32
harold aptroot12-May-10 3:32 
Questionwhat can I do to my poorful combobox to be filled???? Pin
Tunisien8611-May-10 23:13
Tunisien8611-May-10 23:13 
Hi guys,
I develop a csharp smart device.I want know now fill my combobox with data extractedfrom my database .mdf(wishing that the TCP/IP goes well and the connection to my local server works well Laugh | :laugh: ).
My code is:
string sConnection = "Provider=SQLNCLI.1;Persist Security Info=False;User ID=sa;Initial Catalog=GMAO;Data Source=127.0.0.1,1433;Password=sa;";
            string sSQL = "SELECT com FROM energie; ";
            SqlConnection conn = new SqlConnection(sConnection);
            SqlCommand comm = new SqlCommand(sSQL, conn);
            DataSet ds = new DataSet();

            SqlDataAdapter da = new SqlDataAdapter(sSQL,conn);   
            SqlDataReader dr = null;
            try
            {
                comm.Connection.Open();
                da.Fill(ds, "SQL Temp Table");
                foreach (DataRow d in ds.Tables[0].Rows)
                {
                    MessageBox.Show("xxxx");
                    comboBox1.Items.Add(d.ItemArray[0].ToString());
                }  

            }
            catch (SqlException ex)
            {
                MessageBox.Show("connexion impossible");
                MessageBox.Show(ex.Message);
                return;
            }

            dr.Close();
            comm.Connection.Close();

Still not filled after running Frown | :( .
what is the problem???
Thanks
AnswerRe: what can I do to my poorful combobox to be filled???? Pin
#realJSOP11-May-10 23:32
mve#realJSOP11-May-10 23:32 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
Tunisien8611-May-10 23:39
Tunisien8611-May-10 23:39 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
Pete O'Hanlon12-May-10 1:12
mvePete O'Hanlon12-May-10 1:12 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
#realJSOP12-May-10 1:40
mve#realJSOP12-May-10 1:40 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
Tunisien8612-May-10 4:09
Tunisien8612-May-10 4:09 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
johannesnestler13-May-10 5:05
johannesnestler13-May-10 5:05 
AnswerRe: what can I do to my poorful combobox to be filled???? Pin
Luc Pattyn12-May-10 3:03
sitebuilderLuc Pattyn12-May-10 3:03 
GeneralRe: what can I do to my poorful combobox to be filled???? Pin
Tunisien8613-May-10 1:00
Tunisien8613-May-10 1:00 
QuestionMulticolumn listbox in smart device application Pin
bacem smari11-May-10 23:06
bacem smari11-May-10 23:06 
AnswerRe: Multicolumn listbox in smart device application Pin
William Winner12-May-10 6:22
William Winner12-May-10 6:22 
Questionrole of substitution Pin
tek 200911-May-10 23:02
tek 200911-May-10 23:02 
AnswerRe: role of substitution Pin
Ravi Sant14-Apr-11 1:05
Ravi Sant14-Apr-11 1:05 
QuestionFree/Open Source Library to Generate Barcodes Pin
Rafferty Uy11-May-10 21:36
Rafferty Uy11-May-10 21:36 
AnswerRe: Free/Open Source Library to Generate Barcodes Pin
Peace ON11-May-10 21:50
Peace ON11-May-10 21:50 
GeneralRe: Free/Open Source Library to Generate Barcodes Pin
Rafferty Uy11-May-10 22:44
Rafferty Uy11-May-10 22:44 
AnswerRe: Free/Open Source Library to Generate Barcodes Pin
Luc Pattyn12-May-10 1:58
sitebuilderLuc Pattyn12-May-10 1:58 
Questionproblem while using delegates in c# Pin
sindhumahe11-May-10 19:42
sindhumahe11-May-10 19:42 

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.