Manage some common ADO Record Sets
The ADO record set Property setting does not overwrite the connection-level setting. If you want to edit the data, you must set the connection string or ReadOnly In The DSN configuration. The following describes the detailed description with the ADO record set ....
To connect to the database server, we must select a database access interface. Although there are many interfaces available to access SQLServer from VB, Microsoft's latest database access interface ADO (ActiveDataObjects) is undoubtedly the most promising, because it provides the possibility for the implementation of browser-based database application systems.
The following are some common functions for database and device management.
1. take the current work database-because the management tasks must generally be completed in the master database, it is best to save the current work database before executing the management task so that the task can be switched back after completion.
2. Determine whether a database device exists
3. Determine whether a virtual device number is occupied: SQLExistDeviceNumber.
4. Find the smallest unused Virtual Device number: SQLGetUnusedDeviceNumber.
5. Obtain the path of the DATA subdirectory under the SQLServer installation directory: SQLGetDataPath.
6. Create a new device: SQLCreateDevice.
7. Create a new database: SQLCreateDatabase65.
8. Obtain the detailed information of the database device: SQLGetDeviceInfo.
9. Expand the size of the database device: SQLExpandDevice.
After a database application system is running for a period of time, increasing the ADO record set usually requires increasing the database size, which in turn requires increasing the device size. Unfortunately, the size parameter required by the DISKRESIZE statement is the new size after expansion, rather than the size to be increased. Therefore, you must check the original size of the device before using the DISKRESIZE statement.