I am trying to get the value of selected item for my combobox which it loads the data from my database.
this is how i define the code. but I can't find what I'm missing. I get this error when i try to run the program.
private void LoadSchematicIndex()
{
string sql;
if (p2pMode == p2p.Trace)
sql = string.Format("SELECT a.RecNo, a.FileName,
a.Title as [Trace Schematic Title] FROM Files a WHERE
a.ProjectRec = {0} AND a.SystemRec = {1} ORDER BY a.Title",
(string)cbModel.SelectedValue, (int)systemMode);
}