Skip to main content

Posts

Showing posts from October, 2007

CDO.message creation failes with "System.Security.SecurityException was unhandled"

"System.Security.SecurityException was unhandled" error appears during creation of CDO.Message object. CDO.Message msgTemp = new CDO.MessageClass(); The error above happens when I tried to run windows forms application from the network drive (default VS projects locations). This was solved only by moving whole project to the my local drive.

Run T-SQL Script from Batch File

The simple way to run T-SQL script from batch file is using SQLCMD command. It's can be useful to run repeatable tasks like backups or restores. Basic syntax is: C:\Windows> sqlcmd -S SERVERNAME -o "OUTPUT_FILE.TXT" -U sa -P PASWORD -i C:\MySCRIPT.sql Following article have more detailed information: Using the SQLCMD command line utility for SQL SERVER