Thanks! I had a typo in one of the SET statements which caused my query
to fail.
BTW, I am using includes for the SET statements:
<statements>
<!-- This SQL fragment sets database options -->
<sql id="DatabaseOptions">
SET NOCOUNT ON;
SET ANSI_NULL_DFLT_ON ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET ANSI_NULLS ON;
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET ARITHABORT ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET QUOTED_IDENTIFIER ON;
SET NUMERIC_ROUNDABORT OFF;
</sql>
</statements>
<select id= . . .>
<include refid="DatabaseOptions"/>
SELECT . . .
________________________________
From: Tony Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 07, 2008 11:13 AM
To: [email protected]
Subject: RE: How do you set SQL Server 2005 database options with
iBATIS?
Can you not just add that as part of your SQL statement? Eg:
<select.....>
SET NOCOUNT ON;
SET ANSI_NULL_DFLT_ON ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET ANSI_NULLS ON;
SELECT field1, field2 FROM myTable ORDER BY field1
</select>
You could also look at the extends attribute or the include element to
bring the same SET's into each query....
Cheers
Tony
From: Ray Wiggins [mailto:[EMAIL PROTECTED]
Sent: 07 February 2008 15:25
To: [email protected]
Subject: How do you set SQL Server 2005 database options with iBATIS?
How do you set SQL Server 2005 database options prior to executing a
query with iBATIS?
e.g.
SET NOCOUNT ON;
SET ANSI_NULL_DFLT_ON ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET ANSI_NULLS ON;