Donald B
Donald B

Reputation: 57

SQLCMD runs in CMD but error in vbs

The following code runs at the CMD line, but get error "Expected end of statement", Line: 1 Char 11.

sqlcmd -S DONALDLT-PC\SQLEXPRESS -E -i C:\SQL\append_ToTblPurchaseDetials.sql

Upvotes: 0

Views: 227

Answers (1)

Jason Byrd
Jason Byrd

Reputation: 726

Its failing because your syntax is incorrect. You can not execute shell scripts directly in visual basic. The statements/parameters need to be properly escaped and passed to some type of execute method. If you are already doing this, please add the entire code.

Upvotes: 1

Related Questions