Click here to Skip to main content
15,922,155 members
Home / Discussions / C#
   

C#

 
QuestionFast dynamic loading of assemblies using reflection Pin
roxtar23-Jun-06 22:49
roxtar23-Jun-06 22:49 
QuestionData Table - Sort [urgent] Pin
SysJey23-Jun-06 22:41
SysJey23-Jun-06 22:41 
AnswerRe: Data Table - Sort [urgent] [modified] Pin
Michael P Butler24-Jun-06 0:56
Michael P Butler24-Jun-06 0:56 
GeneralData Table - Sort Pin
SysJey25-Jun-06 22:44
SysJey25-Jun-06 22:44 
QuestionData Table - Sort [urgent] Pin
SysJey23-Jun-06 22:41
SysJey23-Jun-06 22:41 
QuestionI can't Debug on Pocket PC2002 Emulator [modified] Pin
tr_hoaiphong23-Jun-06 22:32
tr_hoaiphong23-Jun-06 22:32 
QuestionCombo box using data reader , setting value member and display member in win forms Pin
ashishinfra23-Jun-06 21:20
ashishinfra23-Jun-06 21:20 
AnswerRe: Combo box using data reader , setting value member and display member in win forms Pin
ashishinfra29-Jun-06 0:10
ashishinfra29-Jun-06 0:10 
I found the solution for it myself , hope this could be usefull to someone

this is the code snippet for it , it needs a supporting class along with it

private void button1_Click(object sender, System.EventArgs e)
{
	OleDbConnection dbconn = new OleDbConnection(@"Provider=microsoft.jet.oledb.4.0;data source=D:\ashishg\TEST.mdb");
			OleDbCommand dbcmd = new OleDbCommand("Select idTest,NameTest from tbltest",dbconn);
			OleDbDataReader reader;
			dbconn.Open();
			reader = dbcmd.ExecuteReader();
			
            
			ArrayList temptbl = new ArrayList();
			while (reader.Read())
			{
				temptbl.Add(new NameValue(reader["NameTest"].ToString(),reader["idTest"].ToString()));

			}
			dbconn.Close();

			comboBox1.DataSource = temptbl;
			comboBox1.DisplayMember = "NameMember";
			comboBox1.ValueMember = "ValueMember"; 
				   

		
		}



the supporting class

public class NameValue
	{
		private string myNameMember;
		private string myValueMember;

		public NameValue(string strNameMember,string strValueMember)
		{
			this.myNameMember = strNameMember;
			this.myValueMember = strValueMember;


		}
		public string NameMember
		{
			get
			{
				return myNameMember;
			}
		}
		public string ValueMember
		{
			get
			{
				return myValueMember;
			}
		}
	}


The Secret of gettting ahead is getting started
Questionrun c# project Pin
foysal mamun23-Jun-06 20:30
foysal mamun23-Jun-06 20:30 
AnswerRe: run c# project Pin
Tamimi - Code23-Jun-06 20:41
Tamimi - Code23-Jun-06 20:41 
GeneralRe: run c# project Pin
foysal mamun23-Jun-06 20:48
foysal mamun23-Jun-06 20:48 
GeneralRe: run c# project Pin
Tamimi - Code23-Jun-06 20:52
Tamimi - Code23-Jun-06 20:52 
GeneralRe: run c# project Pin
foysal mamun23-Jun-06 20:59
foysal mamun23-Jun-06 20:59 
GeneralRe: run c# project [modified] Pin
Michael P Butler23-Jun-06 21:04
Michael P Butler23-Jun-06 21:04 
GeneralRe: run c# project Pin
foysal mamun23-Jun-06 21:06
foysal mamun23-Jun-06 21:06 
GeneralRe: run c# project Pin
Colin Angus Mackay23-Jun-06 21:24
Colin Angus Mackay23-Jun-06 21:24 
GeneralRe: run c# project Pin
foysal mamun23-Jun-06 21:29
foysal mamun23-Jun-06 21:29 
GeneralRe: run c# project Pin
Colin Angus Mackay23-Jun-06 21:36
Colin Angus Mackay23-Jun-06 21:36 
GeneralRe: run c# project Pin
foysal mamun23-Jun-06 21:52
foysal mamun23-Jun-06 21:52 
GeneralRe: run c# project Pin
Colin Angus Mackay23-Jun-06 22:03
Colin Angus Mackay23-Jun-06 22:03 
GeneralRe: run c# project Pin
Tamimi - Code23-Jun-06 22:05
Tamimi - Code23-Jun-06 22:05 
GeneralRe: run c# project Pin
stancrm23-Jun-06 22:25
stancrm23-Jun-06 22:25 
GeneralRe: run c# project Pin
Tamimi - Code23-Jun-06 21:37
Tamimi - Code23-Jun-06 21:37 
AnswerRe: run c# project Pin
ZHENG.YANG.POINTER24-Jun-06 12:06
professionalZHENG.YANG.POINTER24-Jun-06 12:06 
Questiondesign pattern Pin
fmardani23-Jun-06 19:48
fmardani23-Jun-06 19:48 

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.