Executing an SQL Script

See Also

After creating an SQL script, you can run it to update or modify your database.

To execute an SQL script in Microsoft® Visual InterDev™ or Visual J++™

  1. From the Project Explorer, double-click the SQL script file to open it in the SQL editor.

  2. In Data View, select the database you want to run the script against.

  3. Right-click the open script file in the source editor, and then choose Execute.

    Note   If the Execute command is not enabled, make sure that Data View is active, that you've selected the name of the database in Data View, and that the SQL script file is open in the SQL editor.

If the SQL script runs successfully, the result set appears in the Output window.

To execute an SQL script in Microsoft® Visual C++®

  1. From FileView, double-click the SQL script file to open it in the SQL editor.

  2. In Data View, select the database you want to run the script against.

  3. Right-click the open script file in the source editor, and then choose Run.

    Note   If the Run command is not enabled, make sure that Data View is active, that you've selected the name of the database in Data View, and that the SQL script file is open in the SQL editor.

If the SQL script runs successfully, the result set appears in the Output window.