Forum Discussion

TCqauser's avatar
TCqauser
Occasional Contributor
5 years ago

How to run a .sql file in sqlcmd mode in Javascript via TestComplete

I have a JavaScript file where I connect to the database and have to run a .sql file in order to create lots of tables etc.   I have managed to read the file, but when I execute it, it fails. The r...
  • AlexKaras's avatar
    AlexKaras
    5 years ago

    Hi,

     

    Does WshShell.Run() help?

     

  • tristaanogre's avatar
    tristaanogre
    5 years ago

    AlexKaras wrote:

    Hi,

     

    Does WshShell.Run() help?

     


    I was just going to suggest that.  This is how I've done SQLCMD in the past.  I've created a command line routine that uses WshShell.Run that executes the SQLCMD command line to run the file.