Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET Database & Reporting

Post new topic   Reply to topic
Connect to Access database, authentication - help!
View previous topic :: View next topic  
Author Message
Papa_Charlie
Newbie


Joined: 19 Feb 2005
Posts: 1

PostPosted: Feb 19th, 2005 01:20 PM    Post subject: Connect to Access database, authentication - help! Reply with quote

Well, it looks like it's come to this.

I'm taking a class right now at VCU, with a professor who (and I pray he's not reading this thread) is about as helpful as an Abacus for tax preparation. He's got a "discussion forum" on his website, where he (occasionally) replies with information that is about as vague as his lectures.

I've got a project I'm working on (a project that he hasn't even given us a due date for yet), and right now I'm stuck on the first 1/3rd of the program - validating a username/password from a Microsoft Access database. Here's the error message I keep getting:

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll

It occurs at this line of code:

Dim Matches As OleDbDataReader = HowManyMatches.ExecuteReader

My Prof's response to me was that it was probably a mismatch in names between my SQL statement and my Database. I've put a Debug.Write line into my code, and here's what the SQL statement reads:

SQLStmt=SELECT count(Id) as MatchCounter FROM Accounts WHERE LoginId='owner' and Password='password'

And here is the first line of my Access database (the top "row" are the column names, I added the br to the end of the top row to make sure I get a carriage return and things line up properly in this post):

Id LoginId Password Bailiwicks LastName FirstName Init EmailAddress <br>
1 owner password CEO Owner Company O owner@abc.net

If anybody wants to view the code I'm using, I can email/post it here, or you can actually view it on the Prof's website (yes, for this project, we're actually just copying and pasting his own code into the IDE, then we get to struggle and trace through what it's actually doing). The site is at [link] .

Aside from that, my Access database is named Accounts.MDB, just like in the code. If anyone can help I'd appreciate it, I've just about given up on getting assistance from my Professor. It's sad to think I'm four classes away from a bachelor's degree, and a class where I don't even write my own code may be what ends up killing me.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET Database & Reporting All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic