Click here to Skip to main content
15,906,708 members
Home / Discussions / C#
   

C#

 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 4:16
Michel Godfroid5-May-10 4:16 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 5:06
Tunisien865-May-10 5:06 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 5:12
Michel Godfroid5-May-10 5:12 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 5:29
Tunisien865-May-10 5:29 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Michel Godfroid5-May-10 4:08
Michel Godfroid5-May-10 4:08 
AnswerRe: TCP/IP connexion failed in csharp smart device Pin
Pete O'Hanlon5-May-10 4:40
mvePete O'Hanlon5-May-10 4:40 
GeneralRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien865-May-10 4:59
Tunisien865-May-10 4:59 
AnswerRe: TCP/IP connexion failed in csharp smart device Pin
Tunisien8611-May-10 6:33
Tunisien8611-May-10 6:33 
Hi guys,
I depass the problem Laugh | :laugh: finally of the connection to the server due to the DATABASE FILE's ATTACHMENT.
Still now the problem in the filling of my combobox.In fact,no exception appears so connection to server works well.In other hand,nothing is added to my combobox.
I try to replace my sqldatareader by sqldataset but still the same thing:
private void Form6_Load(object sender, EventArgs e)
        {

            string sConnection = "Data Source=127.0.0.1,1433;Persist Security Info=True;Initial Catalog=GMAO;User ID=sa;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();
            SqlDataReader dr = null;
            try
            {
                
                comm.Connection.Open();
                da.Fill(ds, "SQL Temp Table");
                foreach(DataRow d in ds.Tables[0].Rows)
                comboBox1.Items.Add(d.ToString());
            }
            catch (SqlException ex)
            {
                //MessageBox.Show("connexion impossible");
                MessageBox.Show(ex.Message);
                return;
            }

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

How do I depass that???
Thank u in all cases
I am really sooooooo happy Laugh | :laugh:
Questiondictionary Pin
toto_20105-May-10 0:26
toto_20105-May-10 0:26 
AnswerRe: dictionary Pin
Peace ON5-May-10 0:41
Peace ON5-May-10 0:41 
AnswerRe: dictionary Pin
sanforjackass5-May-10 0:43
sanforjackass5-May-10 0:43 
AnswerRe: dictionary Pin
Richard MacCutchan5-May-10 1:02
mveRichard MacCutchan5-May-10 1:02 
GeneralRe: dictionary Pin
Luc Pattyn5-May-10 2:59
sitebuilderLuc Pattyn5-May-10 2:59 
AnswerRepost - attempt to bump post. Pin
Pete O'Hanlon5-May-10 2:35
mvePete O'Hanlon5-May-10 2:35 
GeneralRe: Repost - attempt to bump post. Pin
toto_20105-May-10 4:49
toto_20105-May-10 4:49 
Questiontransfer data from layer to layer (logic to gui) Pin
igalep1324-May-10 23:49
igalep1324-May-10 23:49 
AnswerRe: transfer data from layer to layer (logic to gui) Pin
Abhinav S5-May-10 0:06
Abhinav S5-May-10 0:06 
GeneralRe: transfer data from layer to layer (logic to gui) Pin
igalep1325-May-10 0:09
igalep1325-May-10 0:09 
AnswerRe: transfer data from layer to layer (logic to gui) Pin
Peace ON5-May-10 0:10
Peace ON5-May-10 0:10 
GeneralRe: transfer data from layer to layer (logic to gui) Pin
igalep1325-May-10 0:19
igalep1325-May-10 0:19 
AnswerRe: transfer data from layer to layer (logic to gui) Pin
Peace ON5-May-10 0:38
Peace ON5-May-10 0:38 
Questionxml creator ? Pin
reza assar4-May-10 23:47
reza assar4-May-10 23:47 
AnswerRe: xml creator ? Pin
Peace ON5-May-10 0:19
Peace ON5-May-10 0:19 
AnswerRe: xml creator ? Pin
Richard MacCutchan5-May-10 0:59
mveRichard MacCutchan5-May-10 0:59 
AnswerRe: xml creator ? Pin
Estys5-May-10 0:59
Estys5-May-10 0:59 

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.