Click here to Skip to main content
16,005,339 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generating listbox based on dataset? Pin
Heath Stewart4-Apr-04 18:06
protectorHeath Stewart4-Apr-04 18:06 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan4-Apr-04 19:09
MeterMan4-Apr-04 19:09 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan5-Apr-04 10:41
MeterMan5-Apr-04 10:41 
GeneralRe: Generating listbox based on dataset? Pin
Heath Stewart5-Apr-04 10:46
protectorHeath Stewart5-Apr-04 10:46 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan5-Apr-04 11:03
MeterMan5-Apr-04 11:03 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan5-Apr-04 14:37
MeterMan5-Apr-04 14:37 
GeneralRe: Generating listbox based on dataset? Pin
Heath Stewart5-Apr-04 17:20
protectorHeath Stewart5-Apr-04 17:20 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan5-Apr-04 18:27
MeterMan5-Apr-04 18:27 
Heath thanks for your help. I'm just not getting it for some reason. I have read what you typed several times and its just not clickin for some reason.
From what I gather you do whatever you want to with the dataset like i'm doing, then when your done messing around with it you then update it with

OleDbDataAdapter1.Update(dataset); // I assume this updates the Dataset<br />

so based on what i'm gathering from you. I type the following to refesh my comboBox

comboBox1.DataSource = dataset; // update the comboBox
if that is the correc then for some reason its not working.

private void removebutton_Click(object sender, System.EventArgs e)
		{
			
			
			try
			{
				
			string strSQL = "DELETE  FROM Movie WHERE Title = '" + comboBox1.Text.ToString() + "'";
			oleDbDeleteCommand1.CommandText = strSQL;
			oleDbDataAdapter1.DeleteCommand = oleDbDeleteCommand1;
 
			oleDbDeleteCommand1.Connection = oleDbConnection1;
			oleDbDeleteCommand1.Connection.Open();
			oleDbDeleteCommand1.ExecuteNonQuery();
			
			MessageBox.Show(comboBox1.Text.ToString() + " has been removed");
			oleDbDataAdapter1.Update(dataset);			oleDbDeleteCommand1.Connection.Close();
			
			
			}
			catch (Exception ex)
			{
				MessageBox.Show("Not found");
				MessageBox.Show(ex.ToString());
				oleDbDeleteCommand1.Connection.Close();
			}
			
			
			oleDbDataAdapter1.Fill(dataset);
			
			comboBox1.DataSource = dataset;		
}


sorry Just not understanding this Confused | :confused:


Win32newb
"Making windows programs worse than they already are"
GeneralRe: Generating listbox based on dataset? Pin
Heath Stewart5-Apr-04 18:34
protectorHeath Stewart5-Apr-04 18:34 
GeneralRe: Generating listbox based on dataset? Pin
MeterMan5-Apr-04 21:14
MeterMan5-Apr-04 21:14 
GeneralChanging menu bars color Pin
MeterMan4-Apr-04 16:34
MeterMan4-Apr-04 16:34 
GeneralRe: Changing menu bars color Pin
Heath Stewart4-Apr-04 18:00
protectorHeath Stewart4-Apr-04 18:00 
GeneralRe: Changing menu bars color Pin
MeterMan4-Apr-04 19:09
MeterMan4-Apr-04 19:09 
GeneralMaking menu Item bring and kill focus Pin
MeterMan4-Apr-04 16:28
MeterMan4-Apr-04 16:28 
GeneralRe: Making menu Item bring and kill focus Pin
Heath Stewart4-Apr-04 17:52
protectorHeath Stewart4-Apr-04 17:52 
GeneralRe: Making menu Item bring and kill focus Pin
MeterMan4-Apr-04 19:12
MeterMan4-Apr-04 19:12 
GeneralRe: Making menu Item bring and kill focus Pin
Heath Stewart4-Apr-04 19:18
protectorHeath Stewart4-Apr-04 19:18 
GeneralRe: Making menu Item bring and kill focus Pin
LongRange.Shooter5-Apr-04 9:18
LongRange.Shooter5-Apr-04 9:18 
GeneralShockwave Flash in Windows Application!! Pin
Imad_4u4-Apr-04 15:40
Imad_4u4-Apr-04 15:40 
GeneralRe: Shockwave Flash in Windows Application!! Pin
Heath Stewart4-Apr-04 17:45
protectorHeath Stewart4-Apr-04 17:45 
GeneralRe: Shockwave Flash in Windows Application!! Pin
Jeremy Kimball5-Apr-04 3:44
Jeremy Kimball5-Apr-04 3:44 
GeneralControl Windows Key on Keyboard Pin
Member 6910894-Apr-04 15:04
Member 6910894-Apr-04 15:04 
GeneralRe: Control Windows Key on Keyboard Pin
Heath Stewart4-Apr-04 17:39
protectorHeath Stewart4-Apr-04 17:39 
GeneralRe: Control Windows Key on Keyboard Pin
Member 6910895-Apr-04 7:13
Member 6910895-Apr-04 7:13 
GeneralStartUp Folder?! Pin
Morten Kristensen4-Apr-04 14:28
Morten Kristensen4-Apr-04 14:28 

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.