ACC1x: How to Use a Microsoft Access Database in Visual BasicLast reviewed: May 14, 1997Article ID: Q105646 |
The information in this article applies to:
SUMMARYMicrosoft Visual Basic version 3.0 for Windows incorporates the Microsoft Access version 1.1 engine and shares dynamic-link library (DLL) files with Microsoft Access. Therefore, Visual Basic can use Microsoft Access database (.MDB) files. Microsoft Access creates a system database (SYSTEM.MDA) file that stores important security information such as user names and accounts. The system database file can be changed only in Microsoft Access. The Visual Basic database engine does not require a system database file unless it interacts with an .MDB file that has the security features enabled.
MORE INFORMATIONIf security for an .MDB file is enabled, the Visual Basic application must run the SetDefaultWorkspace statement before the Visual Basic engine is initialized. The SetDefaultWorkspace statement will set the User ID and password. If the User ID and password are not set, the Visual Basic application will access the .MDB file as a user in the Users group. You can set the location and name of the system database file to be used by the Visual Basic database engine by changing the SystemDB parameter in the [Options] section of the VB.INI file. The sample VB.INI section below demonstrates how to use the MYAPP.MDA system database file in the MYAPP directory:
[Options] SystemDb=C:\MYAPP\MYAPP.MDA REFERENCESMicrosoft Visual Basic, "Professional Features Book 2," Appendix A Microsoft Visual Basic, "Language Reference," page 520 |
Keywords : kbusage ScrtOthr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |