Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 10th, 2006, 3:20 PM   #1
Argosax
Newbie
 
Join Date: Jan 2006
Posts: 1
Rep Power: 0 Argosax is on a distinguished road
Obtaining information from an Access Database in VB

Hello, I am working on a Visual Basic program that has to go "behind the scenes" and confirm an Employee ID and Employee Password. The database name is EmployeeList, and is written in Access. So, how would I write this in my visual basic code? The button is a "Continue" button after entering the Employee ID and Password.

Pretty much what I'm trying to do is comparable to a log in screen. I just need to go out and verify if the user's information is correct. :/ So, any tutorials anyone knows of on how to do this, or could anyone give me some code, and explain the code? I dont just want the code, I want to understand it also. ^^;
Argosax is offline   Reply With Quote
Old Jan 14th, 2006, 12:16 PM   #2
George Giolfan
Newbie
 
Join Date: Aug 2005
Location: Romania
Posts: 13
Rep Power: 0 George Giolfan is on a distinguished road
To connect to Access databases, you can use System.Data.OleDb. Set the Provider in the Connection to "Microsoft.Jet.OLEDB.4.0" and the Data Source to the name of the database file. Since Access supports basic SQL features, you can use a command like "Select [Employee ID] From [Employee table] Where [Employee ID] = '" & EmployeeIDTextBox.Text.Replace("'", "''") & "' And ..." (similar for password). (One would normally use Parameters, but I think that replacing quotes is enough for Access.)
However, this will only provide formal security (someone could use Access). You could ask the user the password to the database itself, then connect.
You should read the .NET Framework SDK and Platform SDK sections about data access.
George Giolfan is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:16 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC