I found that the problem was that my tables had become corrupted by making
too many changes at once. When I removed the tables, ran database admin,
then re-added the tables it worked. It was not related to the different db
types.
On Feb 24, 2015 1:45 PM, "Niphlod" <[email protected]> wrote:

> the first thing to be noted is that you'd need to define the referencED
> table before the referencING one. not strictly needed always but a good
> place to start.
>
> On Monday, February 23, 2015 at 11:44:43 PM UTC+1, Mat Miles wrote:
>>
>> db.define_table('daily_schedule',
>>                 Field('the_day', type='date', label='Schedule Day',
>> requires=IS_NOT_EMPTY()),
>>                 Field('assignment_type_id', type='reference
>> assignment_type', label='Assignment', requires=IS_NOT_EMPTY()),
>>                 format = '%(the_day)s')
>>
>> db.define_table('assignment_type',
>>                 Field('name', type='string', label='Assignment Type'),
>>                 format = '%(name)s')
>>
>> On Sunday, February 22, 2015 at 8:37:31 PM UTC-7, Mat Miles wrote:
>>>
>>> I had a project that a number of tables that reference other tables
>>> using MySQL as the DB. I started another project using SQlite and the
>>> reference tables did not work. I went over and over the project to see if I
>>> had a typo somewhere and could not find one. Finally I converted the table
>>> to MSSQL and the references began working. Is this a bug, or is there some
>>> configuration option that I am missing when using SQlite?
>>>
>>> What I mean by the reference tables not working is that when you go to
>>> create a new record where one of the fields is referencing values in
>>> another table, the box would show for the field, but it would display as a
>>> text field with no values and not a dropdown list.
>>>
>>> -mat
>>>
>>>
>>>  --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/uiFt4csLo-k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.

Reply via email to