Results 1 to 2 of 2

Thread: running sql script(.sql file) through VB

  1. #1
    sumit jakar Guest

    running sql script(.sql file) through VB

    how can a .sql file (containing script for creating tables etc.) be run in Sql Query Analyzer through VB.
    The ultimate task is to create database in sql server 7.0 through VB.

    thanks,
    Sumit

  2. #2
    Karl Guest

    running sql script(.sql file) through VB (reply)

    You can use the osql utility, which is a command line utility. Although you are not using query analyzer it can still run the .sql file you talk about.

    For example:

    osql.exe /U username /P password /i c:...query.sql

    There are other options you can use. Check out BOL for these.

    Regards,

    Karl




    ------------
    sumit jakar at 12/4/00 7:02:07 AM

    how can a .sql file (containing script for creating tables etc.) be run in Sql Query Analyzer through VB.
    The ultimate task is to create database in sql server 7.0 through VB.

    thanks,
    Sumit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •