Click here to Skip to main content
15,899,124 members
Home / Discussions / C#
   

C#

 
GeneralRe: Word 2003 interop dll Pin
Alex Korchemniy7-Jun-05 14:36
Alex Korchemniy7-Jun-05 14:36 
GeneralSending Data through USB Pin
BrianCR896-Jun-05 13:42
BrianCR896-Jun-05 13:42 
GeneralRe: Sending Data through USB Pin
Alex Korchemniy7-Jun-05 14:38
Alex Korchemniy7-Jun-05 14:38 
GeneralRe: Sending Data through USB Pin
Alex Korchemniy7-Jun-05 14:41
Alex Korchemniy7-Jun-05 14:41 
GeneralRe: Sending Data through USB Pin
BrianCR898-Jun-05 7:28
BrianCR898-Jun-05 7:28 
GeneralThreads that doesn't start Pin
Alex Cutovoi6-Jun-05 13:17
Alex Cutovoi6-Jun-05 13:17 
GeneralRe: Threads that doesn't start Pin
S. Senthil Kumar6-Jun-05 20:54
S. Senthil Kumar6-Jun-05 20:54 
GeneralListview in child window is not updating data Pin
greg_quinn6-Jun-05 9:58
greg_quinn6-Jun-05 9:58 
I'm having this strange problem where I have updated data in one MDI child window, and want to refresh the data in another MDI child window.

I have a function called populateExhibitions which fills a listview with data from my db. This works fine first time round. But when I called populateExhibitions from another MDI child window,

i.e

<br />
frmExhibitions fExhibitions = new frmExhibitions();<br />
fExhibitions.populateExhibitions();<br />


it then calls my populateExhibitions function again, but it never updates the data in the list view. Even though the data coming from the database is indeed updated! (The datareader object proves this to me!)

<br />
public void populateListViewExhibitions(DataListView.DataListView dataListView)<br />
		{<br />
			dataListView.Items.Clear();<br />
                        OdbcConnection objConnection = new OdbcConnection(getConnString());<br />
			string sql = "Select id, name from exhibitions order by name";<br />
			<br />
			objConnection.Open();<br />
			OdbcCommand objCommand = new OdbcCommand(sql, objConnection);<br />
			OdbcDataAdapter objDataAdapter = new OdbcDataAdapter(objCommand);<br />
			DataTable dtListView = new DataTable();<br />
		<br />
			objDataAdapter.Fill(dtListView);<br />
			dataListView.AutoDiscover = false;<br />
			dataListView.Columns.Add("ID", "ExhibitionID", 200);<br />
			dataListView.Columns.Add("Name", "name", 200);<br />
			dataListView.DataSource = dtListView;<br />
			<br />
			objConnection.Close();<br />
<br />
			// looping through a datareader shows the new data is coming from the db<br />
                        objConnection.Open();<br />
			OdbcDataReader objDataReader;<br />
			objDataReader = objCommand.ExecuteReader();<br />
            <br />
			<br />
                        while(objDataReader.Read())<br />
			{<br />
				MessageBox.Show("Name = " + objDataReader["Name"].ToString());<br />
<br />
<br />
			}<br />
<br />
			objDataReader.Close();<br />
			objConnection.Close();		<br />
		}<br />


What am I missing here?
GeneralRe: Listview in child window is not updating data Pin
Luis Alonso Ramos6-Jun-05 13:11
Luis Alonso Ramos6-Jun-05 13:11 
GeneralExporting contact info in outlook with C# Pin
rrd9c6-Jun-05 9:27
rrd9c6-Jun-05 9:27 
QuestionHow to call function in another MDI child window Pin
greg_quinn6-Jun-05 9:05
greg_quinn6-Jun-05 9:05 
AnswerRe: How to call function in another MDI child window Pin
S. Senthil Kumar6-Jun-05 20:57
S. Senthil Kumar6-Jun-05 20:57 
GeneralIs it possible to get my webpage url Pin
god4k6-Jun-05 8:49
god4k6-Jun-05 8:49 
GeneralRe: Is it possible to get my webpage url Pin
Colin Angus Mackay6-Jun-05 10:11
Colin Angus Mackay6-Jun-05 10:11 
QuestionElegant Client/Server? Pin
methodincharge6-Jun-05 7:51
methodincharge6-Jun-05 7:51 
AnswerRe: Elegant Client/Server? Pin
Christian Graus6-Jun-05 12:52
protectorChristian Graus6-Jun-05 12:52 
GeneralRe: Elegant Client/Server? Pin
methodincharge6-Jun-05 16:14
methodincharge6-Jun-05 16:14 
GeneralRe: Elegant Client/Server? Pin
Christian Graus6-Jun-05 16:17
protectorChristian Graus6-Jun-05 16:17 
GeneralRe: Elegant Client/Server? Pin
methodincharge7-Jun-05 2:48
methodincharge7-Jun-05 2:48 
GeneralRe: Elegant Client/Server? Pin
Christian Graus7-Jun-05 11:39
protectorChristian Graus7-Jun-05 11:39 
GeneralPlease give me a fever printing code problem, build id problem and insertion problem Pin
Saif_S6-Jun-05 7:19
Saif_S6-Jun-05 7:19 
GeneralRe: Please give me a fever printing code problem, build id problem and insertion problem Pin
Dan Neely6-Jun-05 9:09
Dan Neely6-Jun-05 9:09 
GeneralRe: Please give me a fever printing code problem, build id problem and insertion problem Pin
DavidNohejl6-Jun-05 9:48
DavidNohejl6-Jun-05 9:48 
GeneralRe: Please give me a fever printing code problem, build id problem and insertion problem Pin
Judah Gabriel Himango6-Jun-05 10:11
sponsorJudah Gabriel Himango6-Jun-05 10:11 
GeneralRe: Please give me a fever printing code problem, build id problem and insertion problem Pin
Saif_S7-Jun-05 4:55
Saif_S7-Jun-05 4:55 

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.