D
Doug
I am exectuing a query (against an Access database) and the results
are not an exact match of the search criteria.
I have a list of packages saved in an Access file. Before doing
certain operations, I want to see if a tracking number has already
been saved to file.
The tracking number "1234567890" is already stored in the file.
The tracking number "12345678901" is NOT in the file.
When I execute the query "Select * from Pkg WHERE TrackingNo =
'12345678901', nothing should be returned. Instead the record for
tracking number "1234567890" is returned.
I thought that the '=' sign meant an exact match, but in this case
that is not what's happening.
For what it's worth the same query run in Access does not return any
records (which is the behavior I'm looking for). This leads me to
believe this is a c# issue and not an Access issue.
Any ideas?
TIA
Doug Ferguson
This is a snippet of the code:
string strSql = "Select * from Pkg where TrackingNo = '" +
this.TrackingNo + "'";
OleDbDataAdapter da = new OleDbDataAdapter(strSql,conStr);
da.Fill(dt) //dt is a datatable declared earlier
are not an exact match of the search criteria.
I have a list of packages saved in an Access file. Before doing
certain operations, I want to see if a tracking number has already
been saved to file.
The tracking number "1234567890" is already stored in the file.
The tracking number "12345678901" is NOT in the file.
When I execute the query "Select * from Pkg WHERE TrackingNo =
'12345678901', nothing should be returned. Instead the record for
tracking number "1234567890" is returned.
I thought that the '=' sign meant an exact match, but in this case
that is not what's happening.
For what it's worth the same query run in Access does not return any
records (which is the behavior I'm looking for). This leads me to
believe this is a c# issue and not an Access issue.
Any ideas?
TIA
Doug Ferguson
This is a snippet of the code:
string strSql = "Select * from Pkg where TrackingNo = '" +
this.TrackingNo + "'";
OleDbDataAdapter da = new OleDbDataAdapter(strSql,conStr);
da.Fill(dt) //dt is a datatable declared earlier