Apparently those variables are not public, so I tried to create a DataAdapter. Never having done it before, I must have screwed somthing up
It doesn't seem to make any difference to the Datagridview.
Here's my code:C# Code:
string MainSQLFilter = @"SELECT ID, [RFI #], [Area/Seq] //etc... FROM RFI WHERE (ID IN ("; //Builds the ID List using string concatenation. I know it's bad practice, but this is only for testing. for (i = 0; i < idNumbers.Count; i++ ) { MainSQLFilter += idNumbers[i].ToString(); if (i < idNumbers.Count - 1) { MainSQLFilter += ", "; } else { MainSQLFilter += "))"; } } //Both of these seem to return correctly MessageBox.Show(MainSQLFilter + "\r\n" + connectionString); //And here I make a DataAdapter OleDbDataAdapter da = new OleDbDataAdapter(MainSQLFilter, connectionString); //And use it to fill the data table da.Fill(virtualModelDataSet.RFI);
But my DataGridView doesn't change. Any idea why?




Reply With Quote