I am working with windows forms in VB.NET and MS Access database. I need to check that if user already exist in my database or not and take further action accordingly. After searching for awhile I came across this solution.
INSERT INTO usertabble (user_name , pass_word)
SELECT 'username', 'password' FROM DUAL
WHERE NOT EXISTS (SELECT * FROM usertable
WHERE user_name='username' AND pass_word='password' LIMIT 1)
But the problem is DUAL keyword. Query after that keyword shows syntax error. I learned that DUAL is exclusive to oracle databases. So I found a workaround for MS Access which is creating table named DUAL in same database. But that is also not working.
Is there any problem with my approach? or Simply it is not doable? Is there any other alternative?