string.Concat(); string.Format(); string.Append(); stringBuilder
try { OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); myOleDbConnection.Open(); OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); string str="99"; myOleDbCommand.CommandText = "select sale_price,postion from item where ip=" + str; OleDbDataReader dr = myOleDbCommand.ExecuteReader(); dr.Read(); ///////////get results dr.Close(); myOleDbConnection.Close(); } catch { }
myOleDbCommand.CommandText = string.Format("select sale_price,postion from item where ip='{0}'", str);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)