bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Relational database minor change suggestion


From: Jim Segrave
Subject: Re: [Bug-gnubg] Relational database minor change suggestion
Date: Wed, 1 Jun 2005 19:10:05 +0200
User-agent: Mutt/1.4.2.1i

On Wed 01 Jun 2005 (18:25 +0200), Renzo Campagna wrote:
> hmmm, are u sure Jim?
> is possible to have the Oystein's opinion for this?
> in the past he tolds me that need some works for relational db in windows
> (python panel is still unavailable), but may be i've lose something new...
> 
> a little guide to how to setup sqlite & python for windows is very
> appreciate :)

Assuming you have Sqlite installed, this should work

Make sure you have sqlite.py in your python installation directory

<URL:http://py.vaults.ca/parnassus/apyllo.py/973100124.737617149>

Then you'd need to edit the gnubg script database.py:

around line 39:
# Change this line to set the database type
DB_TYPE = DB_SQLITE

around line 464
    if DB_TYPE == DB_SQLITE:
            DBFILE = "data.db"
            import sqlite

change the 'import sqlite' above to 
            from pysqlite2 import dbapi2 as sqlite

you need to create the database "data.db" and then get the tables set
up the database. In a DOS box, try:

C:\gnubg> sqlite data.db < gnubg.sql

where gnubg.sql is the set of SQL statements used to create all the
tables and should be distributed with the installation (it is in the
CVS source for gnubg, I don't know if it's in the distribution or not.

Note that I don't have Windows and haven't tried any of this, but from
Googling a bit, I gather this is what should be needed. Once the
database is populated, the relational database commands should work            


-- 
Jim Segrave           address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]