Thanks everyone for wise advice. In my particular case, there is normally only one user, just occasionally two, on different machines, but the applications must run on either of two machines using the same database.
I will bear in mind your advice about serving applications over the network and using a database with a server but, just for the record, I have successfully run the Pyjamas Example with the SQLite database on a remote machine connected via a VPN. Since I am currently on Windows XP the connection statement looked like this: db = DAL(r'sqlite://\\remotemachinename\SharedDocs\storage.sqlite') (using a raw string to avoid having to double up the \ characters) So it can be done. Thanks again everyone. Phil On Oct 5, 2:45 am, Álvaro Justen [Turicas] <alvarojus...@gmail.com> wrote: > On Sun, Oct 4, 2009 at 08:18, BluePoint <phil.charleswo...@physics.org> wrote: > > > Yes, thanks, I understand that - my current apps look for the database > > in a shared folder > > on another machine. However, I was wondering how one would tell web2py > > to do that. > > Normally one specifies the database in models/db.py by a line like: > > db = DAL('sqlite://storage.sqlite') > > and the database automatically goes in the databases sub-directory. > > How would one modify that code to use a path something like: > > '//othermachine/databases/storage.sqlite' ? > > If you want to create more apps using this database and in a near > future you are thinking in having more users/concurrent requests, I > think you could migrate your system to web2py using SQLite now > (exported via NFS or Samba, for example) and migrate your database to > a better system (like MySQL, PostgreSQL etc.) - it'll be easy to > change database in web2py (just change DAL string) and web2py could > help you migrate data from SQLite to MySQL/PostgreSQL/whatever > database system. > > > On Oct 3, 5:25 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > >> sqlite is not a client server database so the only option is for you > >> to share the folder (smb or nfs). > > >> On Oct 3, 10:49 am, BluePoint <phil.charleswo...@physics.org> wrote: > > >> > I currently have a suite of 3 applications (not using Web2py) which > >> > run on different machines on a LAN and all access a single SQLite > >> > database on one of those machines. I am considering porting the > >> > applications to Web2py but I wonder if it will be possible to share > >> > the database in this way. > > -- > Álvaro Justen > Peta5 - Telecomunicações e Software Livre > 21 3021-6001 / 9898-0141 > http://www.peta5.com.br/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---