On Wed, Feb 8, 2012 at 9:20 PM, Michael B. Smith <[email protected]> wrote: > Finally, Exchange cares about whether you are doing Get-Content in ASCII, > UTF8, or UTF16. I don’t know if invoke-sqlcmd does or not – but you should > check.
It's just a CLR string once the bytes are out of the file and on their way to the SqlCommand... and it's always, always a good idea to be aware of every input file's encoding (choose a sensible default like UTF-8, but provide switches to override--there is no 100% reliable way the framework can detect the encoding). Some other things to think about include: - Whether or not to use SQL transactions - Whether a given exception is fatal (e.g., not much sense in forging ahead with SQL commands if the database is offline, or trying to create a foreign key on a table that failed) - Setting the process exit code on exceptions --Steve ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin
