Click here to Skip to main content
13,800,287 members
   

C#

 
GeneralRe: Nullable reference types in C# Pin
jschell20-Nov-17 7:36
memberjschell20-Nov-17 7:36 
GeneralRe: Nullable reference types in C# Pin
Eddy Vluggen20-Nov-17 7:37
professionalEddy Vluggen20-Nov-17 7:37 
QuestionC# and SQL application help Pin
Member 1352717817-Nov-17 7:35
memberMember 1352717817-Nov-17 7:35 
GeneralRe: C# and SQL application help Pin
Sascha Lefèvre17-Nov-17 8:07
professionalSascha Lefèvre17-Nov-17 8:07 
AnswerRe: C# and SQL application help Pin
OriginalGriff17-Nov-17 9:07
protectorOriginalGriff17-Nov-17 9:07 
QuestionRe: C# and SQL application help Pin
Member 1352717817-Nov-17 12:13
memberMember 1352717817-Nov-17 12:13 
AnswerRe: C# and SQL application help Pin
OriginalGriff18-Nov-17 0:13
protectorOriginalGriff18-Nov-17 0:13 
QuestionHow to put two columns in a combo box Pin
Member 1227854217-Nov-17 1:20
memberMember 1227854217-Nov-17 1:20 
Please help. How to put two columns in a combo box (list Box, text box:mad. I work with VS2015, c# and MySql 5.7.
Attached part of the code.

private void comboBox1_Click (object sender, EventArgs e)
{
MySqlConnection conn;
myConnectionString = pwput;
conn = new MySql.Data.MySqlClient.MySqlConnection ();
conn.ConnectionString = myConnectionString;
try
{
conn.Open ();
}
catch (MySqlException ex)
{
switch (ex.Number)
{
case 0:
MessageBox.Show ("DO NOT SUCCE TO CONNECT ON SERVER, CLOSE PROGRAM TO TAKE A REPLY");
Close ();
break;
case 1042:
MessageBox.Show ("NOT ACTIVE SERVER, SUBSCRIBE SERVER PA REPEAT CONNECTING");
Close ();
break;
}
conn.Close ();
}
if (conn.State! = ConnectionState.Open)
{
MessageBox.Show ("DO NOT SUCCE TO CONNECT ON SERVER \ r \ n CLOSE PROGRAM TO TAKE READY \ r \ n");
}
else
{
AutoCompleteStringCollection kontoopis = new AutoCompleteStringCollection ();
string wnadidok = "SELECT idkonto, FROM account name";
loadingData = false;
DataTable dtkon = new DataTable ();
dtkon.Columns.Add ();
dtkon.Columns.Add ();
MySqlDataAdapter mdkon = new MySqlDataAdapter (wnadidok, conn);
mdkon.Fill (dtkon);
loadingData = true;
comboBox1.DataSource = dtkon;
// which field is shown in the table below
comboBox1.DisplayMember = "idkonto";
comboBox1.ValueMember = "idkonto";
comboBox1.DisplayMember = "title";
comboBox1.ValueMember = "title";
comboBox1.SelectedIndex = -1;
comboBox1.Text = "";
loadingData = false;
}
conn.Close ();
}

Thank you
AnswerRe: How to put two columns in a combo box Pin
Eddy Vluggen17-Nov-17 1:46
professionalEddy Vluggen17-Nov-17 1:46 
GeneralRe: How to put two columns in a combo box Pin
Member 1227854220-Feb-18 2:17
memberMember 1227854220-Feb-18 2:17 
AnswerRe: How to put two columns in a combo box Pin
Karthik Bangalore17-Nov-17 1:59
mvpKarthik Bangalore17-Nov-17 1:59 
GeneralRe: How to put two columns in a combo box Pin
Member 1227854220-Feb-18 2:09
memberMember 1227854220-Feb-18 2:09 
GeneralRe: How to put two columns in a combo box Pin
Karthik Bangalore20-Feb-18 2:11
mvpKarthik Bangalore20-Feb-18 2:11 
QuestionActive Directory Questions Pin
Kevin Marois16-Nov-17 8:58
professionalKevin Marois16-Nov-17 8:58 
AnswerRe: Active Directory Questions Pin
Richard Deeming16-Nov-17 10:50
mvpRichard Deeming16-Nov-17 10:50 
GeneralRe: Active Directory Questions Pin
Kevin Marois16-Nov-17 11:01
professionalKevin Marois16-Nov-17 11:01 
GeneralRe: Active Directory Questions Pin
Kevin Marois16-Nov-17 11:49
professionalKevin Marois16-Nov-17 11:49 
GeneralRe: Active Directory Questions Pin
Mycroft Holmes16-Nov-17 12:36
memberMycroft Holmes16-Nov-17 12:36 
AnswerRe: Active Directory Questions Pin
BillWoodruff16-Nov-17 21:44
mentorBillWoodruff16-Nov-17 21:44 
GeneralRe: Active Directory Questions Pin
Richard MacCutchan16-Nov-17 23:54
protectorRichard MacCutchan16-Nov-17 23:54 
GeneralRe: Active Directory Questions Pin
Kevin Marois17-Nov-17 5:39
professionalKevin Marois17-Nov-17 5:39 
AnswerRe: Active Directory Questions Pin
Nathan Minier17-Nov-17 2:36
professionalNathan Minier17-Nov-17 2:36 
Generalsession Pin
Ishi Kaushik16-Nov-17 8:04
memberIshi Kaushik16-Nov-17 8:04 
AnswerRe: Hello , I am working on three tier architecture based project, i am stuck in writting session code. so please tell me how and where i can write the session code Pin
OriginalGriff16-Nov-17 9:03
protectorOriginalGriff16-Nov-17 9:03 
QuestionData type mismatch in criteria expression." in c# Pin
sai.201216-Nov-17 6:54
membersai.201216-Nov-17 6:54 

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.


Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.181214.1 | Last Updated 15 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid