My_DB = DAL('sqlite://databaseName',
folder='D:\Data_Python_25\Beheer.......')


--
Thadeus




On Mon, Nov 1, 2010 at 4:12 PM, Stef Mientki <stef.mien...@gmail.com> wrote:

> hello,
>
> the more I get used to the syntax of DAL,
> the more I like it, great !
>
> especially, after splitting up the queries and making some helper
> functions, like this
>    Module = 'D2_D1'
>    Query  = ( DB.Module.id     == DB.PRID_MID.MID  ) & \
>             ( DB.Project.id    == DB.PRID_MID.PRID ) & \
>             ( DB.Afdeling.id   == DB.Project.AID   ) & \
>             ( DB.Module.Module == Module           )
>    Select = DB.Project.Name, DB.Afdeling.Name, DB.Project.id
>    print Get_Table_Data ( DB, Query, Select )[1:]
>    print Get_Single_List ( DB, Query, Select )
>    print Get_Data_Dict ( self.DB.Level )
>
> too bad we can't use the normal "and" notation :-(
>
>
> My question is where is the database folder (it seems to be everywhere ;-)
> ?
> Can it be set explicitly ?
>
> It seems that the sql-log-file and the .table files are written in the CWD.
> As a workaround I now keep track of the cwd,
> and if I use "define_table" I first set the cwd to the database directory.
> But I assume there are more actions where the cwd need to be set to the
> database folder,
> so I expect more problems/
>
> I use the following to create the database:
>    Database_Name = r'D:\Data_Python_25\Beheer\ID_TO_Beheer_DAL.db'
>    My_DB = DAL ( 'sqlite://' + Database_Name )
>
>
>
> thanks,
> Stef Mientki
>

Reply via email to