SqlCommand
cmd.Connection = SQlCon;
cmd = new SqlCommand();Server server = new Server(new ServerConnection(SQlCon));server.ConnectionContext.ExecuteScalar(txtPath.Text);
The following error occur on above line
An exception occurred while executing a Transact-SQL statement or batch.