Try using a questions mark...
I don't know Delphi, but in .Net (using C# code), the "Add" method for an OleDbCommand object binds the replacible parameters for a query. Consider the following C# code (from an application we have here at Maryland)
string queryError = "SELECT Count(*) " +
"FROM UM_ERROR_LOG " +
"WHERE TRANS_DATE = ? AND UNIT_CODE = ?";
.
.
.
OleDbCommand cmd3 = new OleDbCommand(queryError, Global.cn);
cmd3.Parameters.Add("prmTransDate", tdate);
cmd3.Parameters.Add("prmUnitcode", unitcode);
lblError.Text = cmd3.ExecuteScalar().ToString();
I hope this is helpful
Fuller Ming, Jr.
Assistant Director, MIS/IT
University of Maryland
Department of Dining Services
|