I am accessing a table from my access database in my wpf application. But the problem is that there are spaces in the beginning in my column with id. For instance. My table contains an evaluation identifier column that contains various identifiers, such as 141A, 14B, 13521B. but there are spaces at the beginning of these identifiers. (141A, 14A, 14152B), so when I pass the parameter from the request in my wpf application, it returns an empty table. my code
string query1 = "select * from Estimates where EstimateNo = '141A'";
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter();
da.SelectCommand = new OleDbCommand(query1, myDataConnection);
da.Fill(dt);
is there any method where i can specify the condition in the where clause. i) may contain any number of white spaces at startup, but should end, what does the code mean?
What will we do?
source
share