Results 1 to 2 of 2

Thread: DMO and .sql

  1. #1
    Join Date
    Mar 2002
    Posts
    2

    Unanswered: DMO and .sql

    hi
    I juzz wanted to know if i can execute an .sql script using SQL-DMO. The .sql file is generated using Generate SQL Scripts from the console mode of SQL Server..... if so.. how do i proceed .
    thankx

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Have you looked at methods ExecuteWithResults and/or ExecuteImmediate in BOL. I've used these in the past, I had to open up the script file and read it into a variable. Then pass the variable to one of these 2 functions. If using any of these be careful with 'GO' within the script file. In the past it would error on this, I don't know about 2000.
    MCDBA

Posting Permissions

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