In my C#.NET application, I use Microsoft.SqlServer.Management.Server.ConnectionContext.ExecuteNonQuery() to run a script against a SQL Server database.
I would like to know if there is a way to make sure the script does not contain "USE" statement.
I have to make sure the script is ran against a specific database and that it does not change DB while executing.
Thanks!
FROM [DB].[Owner].[TableName]?