I want to Deploy C# application with SQL database. I am using database scripts in MSI insataller. My database scripts working fine on DBCC (database console command) of SQL server 2005 management studio. But while executing “ExecuteNonQuery” in installer it gives exception shown in screen shot.

How can I resolve it?
I am using following connection string.
connString = "Data Source = " + machineName + "\\SQLEXPRESS; Initial Catalog = master; Integrated Security = SSPI";
You can’t use the ‘GO’ command inside of a SqlCommand like that. Here’s a good explanation and a few workarounds:
http://weblogs.asp.net/jgalloway/archive/2006/11/07/Handling-_2200_GO_2200_-Separators-in-SQL-Scripts-2D00-the-easy-way.aspx