That's a lot of overhead to get confused. Try to keep your programs simpler while learning new things.
Code:
using System;
using System.Data.OleDb;
namespace ConsoleApplication1
{
internal class Program
{
public static bool ValidateUser(string password, string username)
{
const string connectionString = "Provider=MSDAORA;Data Source=xe;Persist Security Info=True;User ID=GOL;Password=kaRkaRr0t";
const string sql = "SELECT COUNT(*) FROM USERLOGIN WHERE USERNAME = @name AND PASSWORD = @password";
using (var connection = new OleDbConnection(connectionString))
{
using (var command = new OleDbCommand(sql, connection))
{
command.Parameters.AddWithValue("@name", username);
command.Parameters.AddWithValue("@password", password);
return Convert.ToInt32(command.ExecuteScalar()) > 0;
}
}
}
public static void Main(string[] args)
{
const string user = "test";
const string password = "secret";
bool isValid = ValidateUser(password, user);
Console.WriteLine("{0}/{1} is {2}", user, password, isValid ? "valid" : "invalid");
}
}
}
I couldn't test it here, but it should demostrate what steps you have to take to authenticate somebody.