[Twisted-Python] Is it possible to turn off transactions for adbapi?

Mark Wright markscottwright at gmail.com
Thu Mar 18 12:44:21 EDT 2010


Hey - ! was wrong.  It's actually easy, just specify "autocommit=True"
in your call to adbapi.ConnectionPool(...) and runOperation can
execute "create database".

On Thu, Mar 18, 2010 at 10:53 AM, George Pauly
<george at ringdevelopment.com> wrote:
> Hi Mark,
>
> On Thu, 2010-03-18 at 14:29 +0000, markscottwright at gmail.com wrote:
>> I'm trying to get SQL Server 2005 to CREATE DATABASE using twisted.
>> However, SQL Server won't allow you to run CREATE DATABASE within a
>> transaction (apparently, it's not something sql server can roll back,
>> which seems sensible). Which means that the following code results in
>> an error. Is there a way to turn transactions off for a query?
>
> First, you may be better off finding a SQL Server list.
>
> FWIW, and not a twisted solution per se, if the SQL server and your
> twisted server are in a secured network you can send an http msg with
> your create database statement.  This solution requires a webserver
> (IIS) running on the sql server box and some configuration (a virtual
> directory IIRC).
>
> This solution will work from a non-windows OS.  For more complicated
> queries, taking the ODBC black box out of the equation makes
> optimization simpler (or even possible).
>
> LMA (Luvin my acronyms).
>
> George
>
> --
> George Pauly
> Ring Development
> www.ringdevelopment.com
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
Mark Wright
markscottwright at gmail.com



More information about the Twisted-Python mailing list