So the user is going to be uploading a .sqlite file which you want to 
connect to with the DAL and import? 

You should be able to create a new DAL connection within a controller 
function or probably better yet a module instead of in a model file (which 
would have been run too early in the request process). So save the uploaded 
.sqlite file then find out the filename that web2py gave it and then pass 
that filename (and path) to a new dal connection, proceed to define the 
tables as usual and import away.

On Thursday, May 10, 2012 6:38:41 PM UTC-5, Dave wrote:
>
> Any examples or suggestions on how to load data from a user-uploaded 
> .sqlite database?
>
> I will have the database structure of the uploaded files ahead of time 
> (they are being generated by a mobile app), so I need a way to transfer the 
> data from an uploaded .sqlite file to my web2py tables.  is it possible to 
> just use the uploaded file as a new dal, then transfer the data to the main 
> dal, all within a function?
>
> Thanks in advance,
> Dave
>

Reply via email to