Dave Bailey <an*******@discussions.microsoft.com> wrote:
Thanks for all the help. I am using the following code:
private string GetSystemCode()
{
string code = sysCodeList.SelectedItem.ToString();
int offset = code.IndexOf(' ');
if (systemCodeCheck.Checked == true)
{
return " and wo3 = '" + ((offset == -1)? code: code.Substring(0,
offset)) + "'";
}
else
{
return null;
}
}
Thuis code is part of a select statement which is the where clause.
It appears that this code does not trim the drop down list box to the
information that is on the left side of the first space.
Any suggestions?
Yes - step through it, find out what offset is, find out what code is,
find out what the returned value is, etc.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too