Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Saturday, July 12, 2014 10:11 PM
Greetings to everyone
I'm trying to build a login form using vb 2010 express with ms access 2013 as the back end, the database file is saved as .mdb. an error appears when the event handler for the Ok button on the login form is executed and then it points to conn.open() which is defined inside a public function that verifies the user input against the password table.
feel free to check out the attachment, your kind replay is very much appreciated.
Friday, July 18, 2014 1:47 AM ✅Answered
Hi,
I referred to this tAnd quoted the answer here.
<copied>
ISAM stands for Indexed Sequential Access Method, a method for indexing data for fast retrieval. MS-Access is an ISAM-style Implemented database and if the required ISAM drivers are not present system throws this exception. ACE.OleDb.12.0 is a new kind of provider model and this driver is not by default installed on any Windows system unless until you installed office 2007.
To solve this issue you can download 2007 Office System Driver: Data Connectivity Components or Microsoft Access Database Engine 2010 Redistributable. OR Another reason could be for improper connection string. i.e you need to modify your connection string to Data Source = instead of DataSource.
Are you using a 64 bit OS ? if so i am not sure if 64bit version of this drivers are present or not.You can make sure your project is compiled with x86 option or for IIS AppPool is enabled for 32bit.
</copied>
Have a nice time!
Sincerely,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Saturday, July 12, 2014 11:08 PM
I don't know as I've never used a database really.
However your code doesn't appear, from the code I can see, like the code from this link.
How to Dataset with OLEDB Data Source
You can also use the MSDN Library search engine to search for anything related to development I'm fairly certain. Including how to access a database or whatever.
La vida loca
Saturday, July 12, 2014 11:55 PM
Hamad,
Not an answer here (I'm not a database guy), but for the second time today, I've seen where the DataSource of the UserName and Password are kept locally - that is, on a given computer's hard drive.
I have to wonder why that is. What good is it there?
Wouldn't a better plan be to have it where every user of your program would access the same DataSource? The only realistic solution to that would be something more global like a LAN, WAN, or - in my opinion the best option - the internet.
I'll explain more later if you're interested but it does make me wonder why anyone would want to have login credentials isolated to a given computer (and depending on how it's done, only to a given user on a given computer).
Do you feel like explaining more about your thinking here please?
Still lost in code, just at a little higher level.
:-)
Sunday, July 13, 2014 12:07 AM
Hello,
Make sure target CPU (under project properties, compile tab) is set as shown if running on a 64bit OS i.e. Windows 7.
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.
Monday, July 14, 2014 2:42 PM
Thanks for the input Frank, the application is for a university project and i'm trying to get a prototype up and running as soon as possible, i completely agree with that the application should have a many to one relationship where the database is centralized and available for multiple users to access but for the time being, ill just have to build it this way.
Monday, July 14, 2014 2:47 PM
Thanks for the input Frank, the application is for a university project and i'm trying to get a prototype up and running as soon as possible, i completely agree with that the application should have a many to one relationship where the database is centralized and available for multiple users to access but for the time being, ill just have to build it this way.
Actually, all you need is access to a website (that your users also have access to).
I'll explain more about it if you're interested - this doesn't use a database at all (in the traditional sense at least).
Still lost in code, just at a little higher level.
:-)
Monday, July 14, 2014 3:14 PM
Mr.Monkeyboy below is the code where the exception occurs
'The following function main's purpose is to verify the users input.
Public Function CheckInput() As Boolean
Dim conn As New OleDbConnection()
conn.ConnectionString = "provider= microsoft.jet.oledb.4.0; datasource= inventory1.mdb"
**conn.Open() //this is where the exception occurs **
Dim dt As New DataTable() 'creates an instance of class DataTable
Dim ds As New DataSet() 'creates an instance of class DataSet
ds.Tables.Add(dt)
Dim adapt As New OleDbDataAdapter("Select * from Passwords", conn)
adapt.Fill(dt)
'An if condition that ensures values entered are existing in the Passwords table
For Each rw As DataRow In dt.Rows
If rw(0).ToString() = UserBox.Text AndAlso rw(1).ToString() = PassBox.Text Then
Return True
End If
Next
conn.Close()
Return False
End Function
Your help is very much appreciated
Wednesday, July 30, 2014 4:30 AM
Thanks a million jimmy
i'm running 64-bit windows 8.1, the compile properties is set for a x86 platform, i'll try installing the drivers and see if it works, i don't have the complete office suite, i only have access 2013 installed.
Yours sincerely
Hamad
Wednesday, July 30, 2014 1:16 PM
Not sure if this was ever resolved for you but I see the problem. In your connection string "datasource" must be two words.
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= inventory1.mdb"
As others mentioned you need to run the app 32-bit because there is no 64-bit Jet OLEDB Provider. Also, if you update your .mdb database to .accdb (Access 2007-2013) then you must use the ACE OLEDB Provider.
conn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= inventory1.mdb"
Paul ~~~~ Microsoft MVP (Visual Basic)