Click to See Complete Forum and Search --> : how to....


AndyK
March 10th, 2000, 04:11 PM
How to create .mdb file and create recorset for 10 textboxes where I can save to, read from and edit

Programs and requests for them for FREE.
http://falstok.fly.to

Dhirendra123
March 10th, 2000, 06:16 PM
you need MS Access to create mdb files. Using MS Access you can create tables, store data, write query, reports, macrow's and much more.
MS Access is part of MS Office package. It can be purchased separetly, i beleive.

Chris Eastwood
March 10th, 2000, 06:25 PM
You *don't* need access to create MDB databases - you can either do it through code (checkout the DAO objects in the MSDN), or you can use the VisData add-in for VB which is a 'poor-man's' access.

The MDB database is a part of the Jet-Database engine which Access is a front-end for - the Jet-Database engine is part of the standard installation (professional?) of Visual Basic and has no run-time royalties.


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

AndyK
March 10th, 2000, 10:05 PM
Ok I used VisData to create mdb file but how do i save new-made mdb file? i keep on getting errors that file neither is open, etc.
Thanks

Programs and requests for them for FREE.
http://falstok.fly.to

Dhirendra123
March 11th, 2000, 09:22 AM
i did not know that. Thanks Cris.
Every day, I learn something new.
Again Thanks

Chris Eastwood
March 12th, 2000, 03:46 AM
If you want to create a database through code, you'll need to read up on the methods and properties of the DAO (there's just way to many to post here).

Here's a quick example :


'
Dim NewDB as DataBase
'
set NewDB = Workspaces(0).CreateDatabase("c:\newdb.mdb", dbLangGeneral)
'




You'll have to then create all the tables, fields, indexes etc by code also.

If you want to cheat, there's an excellent (free) program over at : http://www.smithvoice.com that will analyse an existing mdb database, and then create all the VB code required to re-create it (so you can just paste it into the code). I've just looked at their site (they've redesigned it) and there's lots of other cool DB code on there - well worth a look.



Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

AndyK
March 12th, 2000, 10:17 AM
LOL, why do you call this program a "cheat" program?

Programs and requests for them for FREE.
http://falstok.fly.to