On Apr 23, 1:35 pm, Gary Doades <[email protected]> wrote:
> On 23/04/2010 4:00 AM, Jeremy Evans wrote:> The ADO adapter does not support
> transactions as the underlying driver
> > does not provide a consistent connection object.
>
> Can you elaborate on this a bit, or at least point to a description of
> the problem? I'm in the process of building a non-trivial application
> using Sinatra and Sequel and I haven't come across any of those issues
> (yet). Obviously ADO itself hasn't got a problem, so which bit of the
> driver chain does not provide consistent connections? What do you mean
> by "does not provide a consistent connection object"?
The ADODB.Connection object that the ADO adapter creates apparently
does not provide a consistent connection to the server. For example,
if you send the BEGIN TRANSACTION sql query and then the COMMIT
TRANSACTION sql query using the connection object provided, you get an
error because the same connection to the server is not used for both.
Give it a shot using the connection object directly, which is fairly
easy in Sequel:
DB.synchronize do |c|
c.Execute("BEGIN TRANSACTION")
c.Execute("COMMIT TRANSACTION")
end
If you can get it working correctly, you might want to take a look at
the ADO adapter and see if Sequel is doing something wrong.
> You should not use
> > the ADO adapter for anything that requires transactions, and I would
> > recommend against using it in production unless your workload is read
> > only.
>
> If this is really the case it might be worth mentioning in the
> documentation. Unless it's there and I missed it, which would be
> unfortunate (for me).
I agree that it should be, and I'm not sure if it is. I've added it
to my todo list.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.