Greetings all...
This has been driving me nutz and I was hoping an expert could help shed
some light.
Why does this query work in Access but not in an
OleDbCommand.ExecuteReader() call?
SELECT tblFilterPhrases_Subject.strPhrase
FROM tblFilterPhrases_Subject
WHERE ((('VIAGRA') Like '*' & [strPhrase] & '*'));
Here is the C# code I'm using:
OleDbCommand sqlCommand;
sqlCommand = new System.Data.OleDb.OleDbCommand();
try
{
sqlCommand.Connection = conn;
sqlCommand.CommandText = "exec Query1";
dreader = sqlCommand.ExecuteReader();
}
The reader comes back as not null... but it contains zero records. In Access
I run the query and it comes back with the correct record. What am I missing
here?
EB