Hi,
Dnia 2011-06-21, wto o godzinie 07:25 -0700, David Marsh pisze:
> I'm trying to get SQAlchemy to connect to a collection of DBFs and I'm
> having some difficulty.
>
> If I use pyodbc, I can connect and extract data using the following
> connection string:
>
> 'Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\\path\\to\
> \dbfs;'
>
> I'm having trouble translating this into something that sqlalchemy can
> use. All of the posts/docs I've seen seem to be connecting to another
> server, not reading DBFs out of a folder.
>
> Is there a way to do this in SQLAlchemy? Am I on the right track
> using pyodbc? Does SQLAlchemy have another method of connecting to
> DBFs that I haven't discovered yet?
>
> Thanks in advance
>
Maybe the way I do it could help you in some way - I use pgdbf
(http://pgdbf.sourceforge.net/) to build the table, and then
I run a script every minute which does:
BEGIN;
TRUNCATE TABLE sometable;
<output of pgdbf -T -C -D -E sometable.dbf>
COMMIT;
It plows through ~ 70MB worth of DBF files within 7.5s on a lousy
server.
Then I run stuff I want on the postgresql database.
I think you may have trouble with running pgdbf under Windows - I run it
on Linux.
regards,
Filip Zyzniewski
Tefnet
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en.