This seems really stupid seeing as they are used so often but how do i create a database using vB 4.0? I am creating a login form and when the command button is hit it compares the username and encrypted password to the stored username and encrypted password, if its a match it continues to the next form, if not it spits out an error, can anyone help?

You can use data control in the default tool box and your database is stored in access file just use the properties of the data control i.e. the databasename to locate the .mdb file and recordesource to work with any specified table from your database


i Hope this helps

You can use data control in the default tool box and your database is stored in access file just use the properties of the data control i.e. the databasename to locate the .mdb file and recordesource to work with any specified table from your database


i Hope this helps

is there no way to create the database so that the program can access and use it without having M$ access? Its just the program i am writing I would usually use M$ access but the user doesn't have M$ access this time or any other database programs so i was rather hoping there would be a way to use databases using vB only.

They don't need access. the jet engine is in MDAC and thats included with win98 / 2000 / nt and xp so your VB app can access an mdb file even if the pc doesn't have MS Access on it.

You don't need a database for that. You could use a flat file, so long as you encrypt the password. Most of these "password files" are set up in the old unix fashion, where each username / password combination is stored on 1 line in the file (so if you had 10 users, you'd have 10 lines in the file). The username and the password would be separated by a delimiter (usually colon), and then split at the time of the read, so something like this:

comatose:myencryptedpassword
hollystyles:hisencryptedpassword
keratinimp:yourencryptedpassword

Then, when the user types in the username and the password, you encrypt the password that they just typed in, the EXACT same way as you encrypted the password they typed in for the file. If the two encrypted passwords are the same, then they are good to go (and if the usernames are the same).

u can use visdata to make a database.. access isnt needed to be present in ur comp. to open visdata: click as follows
addin>visual data manager. visdata wud be open.
then click
file>new>microsoft access> version X.0 MDB (X is the digit u wud prefer)
and then its pretty straight forward.

Sorry i forgot to mention that you may get an error message somthing like " object not found " this will be because the database file, .MDB file is not included in the zip. You would make your own data base file in VB. I thing if i remeber correctly i named mine Phone.mdb
Hope that made sense. Bill

This article has been dead for over six months. Start a new discussion instead.