SqlCommand() ExecuteNonQuery() truncates command text

后端 未结 6 1820
醉话见心
醉话见心 2020-12-11 14:48

I\'m building a custom db deployment utility, I need to read text files containing sql scripts and execute them against the database.

Pretty easy stuff, so far so g

6条回答
  •  囚心锁ツ
    2020-12-11 15:24

    Answer based on comments under the original post:

    GO is a marker for Management Studio / osql / isql. It tells to send a batch of commands to SQL Server. In your utility, you should split the input data using GO as a delimiter and send each element individually (without the GO command)

提交回复
热议问题