1,105,391 Community Members

CODE FOR LOG IN USING VB 2010 CONNECTED TO ACCESS DATABASE

Member Avatar
EjhayEspineli
Newbie Poster
1 post since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hello guys, I'm new to vb 2010 and it screws me alot...
can you please help me to code my login form containing 2 textboxes: usrn and pass. my database Account has two columns, namely Username and Password...
one thing is, I thought it was the same as Vb 6.0, but i was blanked when i've started using vb 2010. when i add data source to my vb application, i thought it was already done, but when i run the program, there's no change even i type wrong username and password combinations. I'm sorry, i just went blank...and i badly need your help now :-/

Member Avatar
Begginnerdev
Veteran Poster
1,142 posts since Apr 2010
Reputation Points: 251 [?]
Q&As Helped to Solve: 191 [?]
Skill Endorsements: 15 [?]
 
0
 

Using This you can find a string.

Try something like this in a connect button click:

Try
    Dim con As New OleDBConnection(Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database Password=" & txtPassword.Text & ";")   'Assuming the password textbox is name txtPassword.
Catch ex As Exception
    MsgBox(ex.ToString())
End Try
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: