[web2py] Standalone DAL, what's the correct uri for the database location ?

2010-10-31 Thread Stef Mientki
hello,

Standalone DAL,  what's the correct uri for the database location ?

This works:
  Database_Name = 'ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://' + Database_Name )


This gives an error, saying couldn;'t find a database after 5 tries
  Database_Name = r'D:/Data_Python_25/Beheer/ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://file:///' + Database_Name )

A workaround is to use os.chdir()

thanks,
Stef Mientki


Re: [web2py] Standalone DAL, what's the correct uri for the database location ?

2010-10-31 Thread Thadeus Burgess
Have you tried without the file:/// ?

On linux you don't need to specify file:/// you can just give the full path.

--
Thadeus




On Sun, Oct 31, 2010 at 3:19 PM, Stef Mientki stef.mien...@gmail.comwrote:

 hello,

 Standalone DAL,  what's the correct uri for the database location ?

 This works:
  Database_Name = 'ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://' + Database_Name )


 This gives an error, saying couldn;'t find a database after 5 tries
  Database_Name = r'D:/Data_Python_25/Beheer/ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://file:///' + Database_Name )

 A workaround is to use os.chdir()

 thanks,
 Stef Mientki



Re: [web2py] Standalone DAL, what's the correct uri for the database location ?

2010-10-31 Thread Stef Mientki
On 31-10-2010 22:01, Thadeus Burgess wrote:
 Have you tried without the file:/// ?
I thought I did, but probably I had other bugs then,
indeed it works without the file///' prefix,
both with forward  and with backward slashes.

thanks,
Stef

 On linux you don't need to specify file:/// you can just give the full path.

 --
 Thadeus




 On Sun, Oct 31, 2010 at 3:19 PM, Stef Mientki stef.mien...@gmail.com
 mailto:stef.mien...@gmail.com wrote:

 hello,

 Standalone DAL,  what's the correct uri for the database location ?

 This works:
  Database_Name = 'ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://' + Database_Name )


 This gives an error, saying couldn;'t find a database after 5 tries
  Database_Name = r'D:/Data_Python_25/Beheer/ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://file:///' + Database_Name )

 A workaround is to use os.chdir()

 thanks,
 Stef Mientki





Re: [web2py] Standalone DAL, what's the correct uri for the database location ?

2010-10-31 Thread rochacbruno
What about the folder atribute?

DAL('sqlite://db.db',folder='D://...')


Enviado via iPhone

Em 31/10/2010, às 19:30, Stef Mientki stef.mien...@gmail.com escreveu:

 On 31-10-2010 22:01, Thadeus Burgess wrote:
 
 Have you tried without the file:/// ?
 I thought I did, but probably I had other bugs then,
 indeed it works without the file///' prefix,
 both with forward  and with backward slashes.
 
 thanks,
 Stef
 
 On linux you don't need to specify file:/// you can just give the full path.
 
 --
 Thadeus
 
 
 
 
 On Sun, Oct 31, 2010 at 3:19 PM, Stef Mientki stef.mien...@gmail.com wrote:
 hello,
 
 Standalone DAL,  what's the correct uri for the database location ?
 
 This works:
  Database_Name = 'ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://' + Database_Name )
 
 
 This gives an error, saying couldn;'t find a database after 5 tries
  Database_Name = r'D:/Data_Python_25/Beheer/ID_TO_Beheer_DAL.db'
  DB = DAL_DB ( 'sqlite://file:///' + Database_Name )
 
 A workaround is to use os.chdir()
 
 thanks,
 Stef Mientki