BackRestEvents (Visual Basic)

SQL-DMO

SQL-DMO

BackRestEvents (Visual Basic)

The Visual Basic BackRestEvents sample demonstrates how to backup and restore a SQL Server database using the SQL-DMO Backup and Restore objects. The sample also illustrates handling Backup and Restore object events.

Default Location

C:\Program Files
\Microsoft SQL Server\80\Tools\Devtools\Samples\Sqldmo\Vb\BackRestEvents

Running the Sample
  1. Open the BackRestEvents.vbp project.

  2. Run the application.
Remarks

The BackRestEvents sample contains a single form, which solicits login information from the user.

Upon successful connection to an instance of Microsoft® SQL Server™, the user selects a database to backup or restore, a file name, and a location, using the Database To Backup/Restore list, and the Backup/Restore File Name box. The user specifies which operation to perform by clicking Backup or Restore.

Backup or Restore object event values are displayed in the Status box at the bottom of the form.

Note  Although the sample allows the user to use either Windows Authentication or SQL Server Authentication, the recommended method for connecting to an instance of SQL Server 2000 is to use Windows Authentication mode.

See Also

SQL-DMO Samples