Sounds like you're issue is with the SQL Server connection properties.
Query Analyzer tends to have different defaults for the connection settings
than your Ant initiated connections.

Look up the error in a sql site like "www.sqlmag.com", I'm sure there will
be an explanation like set AutoCommit on or something like that.

moran

> -----Original Message-----
> From: Rizwan Merchant [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 12:04 PM
> To: Ant Users List
> Subject: sql task sp_dboptions problem
> 
> Hi,
> 
> I am trying to run an sql task which contains the following command
> 
> 
> 
> exec sp_dboption N'on_develop', N'autoclose', N'false'
> 
> 
> 
> I can run this command from SQL Query Analyzer without any problems, but
> when I try to run this via ant sql task I get the following error:
> 
> 
> 
> [sql] Failed to execute:  exec sp_dboption N'on_develop', N'autoclose',
> N'false'
> 
> 
> 
> BUILD FAILED
> 
> C:\workspace\build.xml:409: java.sql.SQLException: [Microsoft][SQLServer
> 2000 Dr
> 
> iver for JDBC][SQLServer]ALTER DATABASE statement not allowed within
> multi-state
> 
> ment transaction.
> 
> 
> 
> 
> 
> Has anyone seen this before? Any help would be appreciated.
> 
> 
> 
> Thanks,
> 
> -Rizwan.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to