What happens when a sqlcmd GO command is followed by another GO command? Here's an example:
View Complete Post
I have a batch file that executes Test.sql. In Test.sql I have following sql statements.
The question is can I pass parameters to the SQL script that I am calling using command ":r".
--Test.sql file contains this script
IF EXISTS (SELECT 1 FROM SYS.DATABASES WHERE NAME = 'NewDB')
DROP DATABASE NewDB
CREATE DATABASE NewDB
:On Error exit
:r c:\Scripts\CREATE_TABLES.sql [parameters...]
See how routed events and routed commands in Windows Presentation Foundation form the basis for communication between the parts of your UI.
MSDN Magazine September 2008
Jim Truher presents an introduction to writing and registering your own custom cmdlets to be used in Windows PowerShell.
MSDN Magazine December 2007
MSDN Magazine May 2005
One major inconvenience of using SQL stored procedures from code is having to match type information. You have to write long wrapper functions around the procedures just to expose the data types. In the .NET Framework, however, the reflection services of the System.Reflection namespace allow you to query rich metadata that describe data types. This article explains how to use reflection in .NET to end your stored procedure nightmares. The author creates four custom classes, including one that generates a SQLCommand object based on the metadata of a method. Using this library, you'll be on your way to automating the generation of stored procedures.
MSDN Magazine August 2002
MSDN Magazine September 2001