Re: [Dbix-class] -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Jess Robinson
On Tue, 3 Oct 2006, Brandon Black wrote: On 10/3/06, Steven Mackenzie [EMAIL PROTECTED] wrote: Hello, DBD::SQLite::VERSION 1.12 DBIx::Class::VERSION 0.07001 I'm running a script to patch an error in my database. It loops over each bad row and fixes it, and works fine, except that

Re: [Dbix-class] -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Kiki
Jess Robinson wrote: .. Although all the connect examples about use AutoCommit = 0, is there a good reason for this, I wonder? Are there any good reasons to turn off AutoCommit with DBIC at all? Jess Saves you a $dbh-begin_work call. Granted, depending on where you start looking

Re: [Dbix-class] Constraints within cursor

2006-10-04 Thread Peter Edwards
Thanks for the link. An issue with UPDATE within CURSOR inside a BEGIN/END TRANSACTION block was fixed recently in SQLite: http://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked Here are other reasons for getting an SQLITE_LOCKED error: ... Trying to write to a table while a SELECT is active

Re: [Dbix-class] -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Steven Mackenzie
Brandon Black wrote: On 10/3/06, Steven Mackenzie [EMAIL PROTECTED] wrote: I'm running a script to patch an error in my database. It loops over each bad row and fixes it, and works fine, except that it requires me to have $data-storage-disconnect(); at the end of it, otherwise I get this

Re: [Dbix-class] -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Steven Mackenzie
Kiki wrote: Jess Robinson wrote: .. Although all the connect examples about use AutoCommit = 0, is there a good reason for this, I wonder? Are there any good reasons to turn off AutoCommit with DBIC at all? Jess Thanks for pointing me back at that doc, my eyes obviously translated

[Dbix-class] Fwd: -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Len Jaffe
Do you mean that when I use DBIC, AutoCommit isn't used to set the underlying DB's autocommit setting?When I set AutoCommit, I expect every C,U, D operation to commit without my intervention, and when I unset AutoCommit, I expect to have to begin/commit all of my own transactions. I find I need

Re: [Dbix-class] Fwd: -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Steven Mackenzie
Len Jaffe wrote: Do you mean that when I use DBIC, AutoCommit isn't used to set the underlying DB's autocommit setting? Now I've read the DBI docs, and a little Schema.pm source, I see that AutoCommit is in fact a DBI attribute, and connect/connection passes it straight down to DBI. It sounds

Re: [Dbix-class] Fwd: -storage-disconnect() Required After Using SQLite?

2006-10-04 Thread Matt S Trout
Len Jaffe wrote: Do you mean that when I use DBIC, AutoCommit isn't used to set the underlying DB's autocommit setting? When I set AutoCommit, I expect every C,U, D operation to commit without my intervention, and when I unset AutoCommit, I expect to have to begin/commit all of my own

Re: [Dbix-class] How to insert multiline fields

2006-10-04 Thread Ash Berlin
Marc Logghe wrote: First of - did you try it like you would with any normal parameter? $row-$colname($value); No, I did a create() call, setting all the fields. In case of the varchar, only the first line is inserted of the multiline string. In case of the clob I get an

Re: [Dbix-class] How to insert multiline fields

2006-10-04 Thread Marc Logghe
TIAS - if not, then someone has got some fun on their hands. I tried and I saw that it worked ... So, this means that an insert statement does not work while an update statement works. This makes it a 2-step procedure: 1) call create() filling all non-clob fields 2) call

[Dbix-class] Anybody still interested in seeing a step-by-step tutorial written?

2006-10-04 Thread Mike Earley
I'm willing to write it, but I'm a DBIC beginner myself and have lots of questions. Some are pretty basic, some are the what-were-they-thinking types, but most are probably the same you'd get from most DBIC newbies. I already have a start on a first lesson. Two tables, one with a belongs_to

[Dbix-class] inserting utf8 data into varchar columns for a postgres utf8 database

2006-10-04 Thread John Napiorkowski
Hi, I'm having trouble inserting data that has some utf8 characters mixed in. I am using a postgres 8.1x database and the database was created with utf8 option. The error I get is: INSERT INTO ... execute failed: ERROR invalid byte sequence for encoding UTF8. The value it's failing on is