Answered
Multiple statements in one cfquery
Providing there is only one or no SELECT statement, can I
issue multiple statements to a database inside a single cfquery?
For example will this work correctly:
<cfquery datasource="myDB" username="myUserName" password="myPassword">
CREATE TABLE dbo.table1 ( ... );
CREATE INDEX Ix1 ON dbo.table1 (col1);
CREATE TABLE dbo.table2 ( ... );
etc...
</cfquery>
or must I SET NOCOUNT ON and put GO between each statement? (I am working with SQL Server 2005.)
Doug
For example will this work correctly:
<cfquery datasource="myDB" username="myUserName" password="myPassword">
CREATE TABLE dbo.table1 ( ... );
CREATE INDEX Ix1 ON dbo.table1 (col1);
CREATE TABLE dbo.table2 ( ... );
etc...
</cfquery>
or must I SET NOCOUNT ON and put GO between each statement? (I am working with SQL Server 2005.)
Doug
