Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Stanciu Vlad8-May-10 10:15
Stanciu Vlad8-May-10 10:15 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien868-May-10 10:47
Tunisien868-May-10 10:47 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Stanciu Vlad8-May-10 11:04
Stanciu Vlad8-May-10 11:04 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien868-May-10 11:19
Tunisien868-May-10 11:19 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Stanciu Vlad8-May-10 11:32
Stanciu Vlad8-May-10 11:32 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien868-May-10 12:23
Tunisien868-May-10 12:23 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien869-May-10 0:10
Tunisien869-May-10 0:10 
AnswerRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien8611-May-10 5:55
Tunisien8611-May-10 5:55 
Hi barts,

Finally I depass the problem of the connexion to server by the DB File's attachment Laugh | :laugh: . No exception apperas.Still now the problem of the filling of my combobox .I try with sqldataset instead of the sqlreader like this:
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();
   SqlCeDataAdapter da = new SqlCeDataAdapter();
   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();
  }

but nothing is added to my combobox.

Thanks in all cases for u collaboration
Laugh | :laugh:
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Stanciu Vlad11-May-10 6:42
Stanciu Vlad11-May-10 6:42 
GeneralRe: SQL server name not found:Admin-PC\MSSQLSERVER,1433 Pin
Tunisien8611-May-10 9:06
Tunisien8611-May-10 9:06 
QuestionNeed advice for improving performance and making an application more robust Pin
Daniel Jacinto8-May-10 4:21
Daniel Jacinto8-May-10 4:21 
AnswerRe: Need advice for improving performance and making an application more robust Pin
#realJSOP8-May-10 5:02
mve#realJSOP8-May-10 5:02 
Questionhelp about the formating of data to be written on a text file... Pin
aeroboy8-May-10 3:30
aeroboy8-May-10 3:30 
AnswerRe: help about the formating of data to be written on a text file... Pin
OriginalGriff8-May-10 3:54
mveOriginalGriff8-May-10 3:54 
GeneralRe: help about the formating of data to be written on a text file... Pin
aeroboy8-May-10 4:10
aeroboy8-May-10 4:10 
QuestionWhere is network login prompt populated from? Pin
DeepToot8-May-10 3:16
DeepToot8-May-10 3:16 
AnswerRe: Where is network login prompt populated from? Pin
Dave Kreskowiak8-May-10 3:29
mveDave Kreskowiak8-May-10 3:29 
QuestionHow Can I export data from DataGridView to Acrobat Reader ? Pin
HDas7-May-10 22:38
HDas7-May-10 22:38 
AnswerRe: How Can I export data from DataGridView to Acrobat Reader ? Pin
Richard MacCutchan7-May-10 22:52
mveRichard MacCutchan7-May-10 22:52 
GeneralRe: How Can I export data from DataGridView to Acrobat Reader ? Pin
DeepToot8-May-10 9:25
DeepToot8-May-10 9:25 
GeneralRe: How Can I export data from DataGridView to Acrobat Reader ? Pin
Richard MacCutchan8-May-10 10:02
mveRichard MacCutchan8-May-10 10:02 
Question3 tier app, data access layer, business logic layer Pin
sky39137-May-10 20:23
sky39137-May-10 20:23 
AnswerRe: 3 tier app, data access layer, business logic layer Pin
Peace ON7-May-10 21:25
Peace ON7-May-10 21:25 
GeneralRe: 3 tier app, data access layer, business logic layer Pin
sky39138-May-10 19:16
sky39138-May-10 19:16 
AnswerRe: 3 tier app, data access layer, business logic layer Pin
Stanciu Vlad7-May-10 22:39
Stanciu Vlad7-May-10 22:39 

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.