Eureka!!! A little embarrassed I missed that. Oh well, I have learned how
to fish! Much appreciated. Being able to connect so easily to a database
from a shell script is a HUGE problem I am trying to solve.
On Thursday, December 7, 2017 at 5:04:52 PM UTC-5, Val K wrote:
>
> OK, just try
> print 'c:\web2py\applications\testme\databases'
> and you will be surprised
>
>
>
> On Friday, December 8, 2017 at 12:14:18 AM UTC+3, Pbop wrote:
>>
>> Sorry for not being more clear in my original question so would like to
>> offer more specific information....
>>
>> I have a SQLITE database located at
>> c:\web2py\applications\testme\databases
>>
>> When running web2py, I have no problem connecting to the database. It
>> loads the test data and works just fine. Web2Py is working great.
>>
>> The problem is when I try to connect to the database from the python
>> command line to db =
>> gluon.DAL('sqlite://storage.sqlite',folder='c:\web2py\applications\testme\databases"),
>>
>> I get an OperationalError. If I I supply the DAL connection string to an
>> empty folder it is creating the database and connecting just fine and have
>> full access to the DAL api. So from the python shell, the DAL is connecting
>> fine to a SQLITE database that was not created by Web2Py, but is not
>> connecting to a database created from Web2Py.
>>
>> I have downloaded PyDAL into Python and can import either from there or
>> from the Web2Py/gluon/packages/dal folder and neither will allow me to
>> connect to a Web2Py created SQLITE database on a Windows Machine. I have
>> ruled out different versions of PyDal and I am an administrator. I am left
>> thinking I may be missing a parameter I have not groked in the docs, or
>> Web2Py may add a protection to not allow connections outside of the Web2Py
>> context.
>>
>>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.