[Dbix-class] DBF access ?

Erik Colson eco at ecocode.net
Mon Jan 28 18:18:44 GMT 2008


On Fri, Jan 25, 2008 at 08:31:17AM +0000, Matt S Trout wrote:
> On Fri, Jan 25, 2008 at 07:52:20AM +0100, Erik Colson wrote:
> > Hello
> > 
> > I'm using DBIx::Class for accessing data in Mysql which does work great.
> > I now would like to use DBIx::Class with DBF (Foxpro or DBase data files).
> > Is this possible ? What would be the best approach ? Would there be some limitations ?
> 
> If there's a DBD then it probably is possible, though you may need to write
> something to handle last_insert_id work since IME that's different with every
> DBD ...

The best way seems to use DBD::ODBC on a windows platform and then use the foxpro driver.
however I'm falling into this problem :

DBIx::Class does generate SELECT statements like this :

  SELECT me.field FROM table me WHERE (me.field=?) :'a_key'

This is not accepted by the foxpro driver which wants :

  SELECT me.field FROM table me WHERE (me.field='a_key')

So, I can circumvent this problem by useing search_literal, but this stops working when DBIx::Class magic starts most of its magic.
Therefor I'm searching for a way to add the possibility to change the SQL layout.. is this already implemented somewhere? if not, where should I do this ?

Thanks for help

-- 
Erik



More information about the DBIx-Class mailing list