J
John Sway
Can you use MS Access queries like you use SQL Stored procedures?
I am using the following to authenticate a user from an Access database:
OleDbCommand cmd = new OleDbCommand(String.Format(
"SELECT COUNT(id) FROM tbl_User WHERE Username = \"{0}\" AND Password =
\"{1}\"",
username, password), dataConn);
I'm wondering if it is possible to write a query in the Access database, and
call it just by passing the username and password as parameters, rather than
embedding the SQL statements in my code.
Thanks!
I am using the following to authenticate a user from an Access database:
OleDbCommand cmd = new OleDbCommand(String.Format(
"SELECT COUNT(id) FROM tbl_User WHERE Username = \"{0}\" AND Password =
\"{1}\"",
username, password), dataConn);
I'm wondering if it is possible to write a query in the Access database, and
call it just by passing the username and password as parameters, rather than
embedding the SQL statements in my code.
Thanks!