When you use parameters, you don't use apostrophes for the values. So instead of
Ole.commandText = "select * from login where user = '@usern' and pass = '@pass'"
try
Ole.commandText = "select * from login where user = @usern and pass = @pass"
Another thing is that you should properly dispose the objects. The easiest way is to use
using
block. For examples, have a look at
Properly executing database operations[
^]
And the third thing is that you seem to store the password as plain text. If this really is the case, you should fix it as soon as possible. Have a look at
Password Storage: How to do it.[
^]