OleDbCommand.ExecuteScalar return problems
The problem is when the query returns nothing. I tried a s == NULL case , but it said null was not valid for a string or something. I also tried saving the return as an "object" type, not exactly sure how that works, then converting it to a string only if the object is not NULL, that didn't work either.
public string getScalar (string query)
OleDbCommand aCommand = new OleDbCommand(query, aConnection);
string s= aCommand.ExecuteScalar().ToString();
any help appriciated. Thanks.