Example Program RunScript

Example Program RunScript, shown in Figure 6.7, ties together several of the objects described in this chapter to execute SQL scripts. Use the File menu’s commands to open an Access or SQL Server database. Use the Open Script command to load a text file containing a SQL script or type one in yourself. When you click the Execute button, the program executes the commands in the script and displays the results. The program displays the records returned by queries. For non-query commands, the program displays a success or failure message.

Figure 6.7. Example program RunScript executes SQL scripts.

The script should contain ...

Get Visual Basic® .NET Database Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.