Hi Good Guys, 
Encountering another puzzling problem. Never happened before when using VB.NET.
It regarding using a strCustID as variable in the SQL WHERE clause and it generate error message:
Here are the Coding.
Code:
private String FCreateSQLString( )
{
string strCustID = listBoxCust.SelectedItem(0).ToString;
string strSql;
strSql += "Select OrderID, ShipName, ";
strSql += "Convert(char(10), OrderDate, 103) as OrderDate, ";
strSql += "Convert(char(10), ShippedDate, 103) as ShipDate, ";
strSql += "From Orders ";
strSql += " WHERE O.customerID = '" & strCustID & "'";
return strSql;
}
-----------------------------------
This coding also cause problem,
string strCustID = listBoxCust.SelectedItem(0).ToString;
I am trying to retrieve the CustomerId from the Listbox whose structure is
this.listBoxCust.DisplayMember = "CompanyName";
this.listBoxCust.ValueMember = "CustomerID";
this.listBoxCust.DataSource = DS.Tables["Cust"];