Saturday, January 16, 2010

Is it possible to write vb code to connect to an MSaccess database WITHOUT putting the DB control on the form?

I don't want to put the DB control on any form of the project. Nor do I want to enter the provider details in any form property box.


1. I have seen some projects which achieve this. Can any one provide some sample code / guidelines for this?





2. Is it possible to hide any control once it is in the form, when in design view mode (during run time one can hide it).?


3. Is it possible to enter a property value and then make it invisible to anyone elese who opens the property window of the form?Is it possible to write vb code to connect to an MSaccess database WITHOUT putting the DB control on the form?
Absolutely. You can use DAO to access any/all data in tables or queries saved in a .mdb file. You need not use any forms or whatever in the .mdb file; in fact, there need be only tables. For a tutorial, see ';Using DAO for data access in your VB apps'; at http://articles.techrepublic.com.com/510鈥?/a>





DAO (and other data access methods) don't require any controls per se; you connect to the database file and execute data access functions directly.

No comments:

Post a Comment