SQL Server - How to execute .SQL file of SQL Query Analyzer

Asked By Bilal Manzoor on 20-Jul-14 12:38 AM
I need to run .SQL file of SQL Query Analyzer programatically either in VB or VC.

And capture the results? - Asked By Robbe Morris on 10-Aug-01 10:03 AM

Probably easiest to read the sql file with FSO and execute the string with ADO.

Otherwise, I'm pretty sure you could use WSH to execute it but I don't think you can capture the results.