I have an Update Form I am working on. So I have two SQL Statements...one that gets all the values associated with the ComboBox and setting its values...
try { SqlDataReader mySQLDataReader1A = mySQLCommand1A.ExecuteReader(); while (mySQLDataReader1A.Read()) { ComboBoxSTCMainSTCDetailModSubNet.Items.Add(mySQLDataReader1A["SNCodes"]); } mySQLDataReader1A.Close(); mySQLDataReader1A.Dispose(); }
And a second SQL Statement which retrieves what the current value of the data column is within the SQL Server Database. Sooooo I then want to make what the current data column for this specific code visible within the ComboBox as its current 'Selected" value along with the other values possible if they'd like to update.
How do I set the current value of the ComboBox data element? Is this done with a "SelectedIndex" or 'SelectedValue" and setting it to what my Dynamic SQL returns via its result set??
Can someone help me with this syntax?
Thanks in advance for your review and am hopeful for a reply.
PSULionRP