Hi Massimo,
I'm working on making a few changes to the TeradataAdaptor in dal.py,
but admittedly learning about how it all works as I go along. I hope
to give you some code sometime soon.
I have created a legacy table with a 2 column PK. I am attempting to
do an insert via the admin screen's "database administration" button,
however the generated insert statement tries to insert NULLS for the
PK columns. (Note that I was having trouble in this area with SQL
Server as well - Nothing was inserted, so I may have a more general
issue).
If you wouldn't mind having a look at this, but I'll keep working
through dal.py.
>From the ticket:
Note: values present for ID1 and ID2 fields.
File D:\Python\web2py\gluon\sqlhtml.py in accepts at line 1194
Function argument list
(self=<gluon.sqlhtml.SQLFORM object>, request_vars=<Storage
{'_formname': 'AndrewTest3/create', '_f...D2': '6722', 'Name':
'DebugTest', 'ID1': '6656'}>, session=<Storage {'_formkey[AndrewTest3/
create]': '0f51d...ge\xc3\xb8\xcb\xbc|\xa1Y\x16\xabd\xfc\xcd\x81s'}>,
formname='AndrewTest3/create', keepvalues=False, onvalidation=None,
dbio=True, hideerror=False, detect_record_change=False)
Then I get "None" for ID1 and ID2 in dal.py
File D:\Python\web2py\gluon\dal.py in insert at line 4790
Function argument list
(self=<Table {'ALL': <gluon.dal.SQLALL object at 0x01C...rewTest3',
'_format': None, 'virtualfields': []}>, **fields={'ID1': None, 'ID2':
None, 'Name': 'DebugTest'})
File D:\Python\web2py\gluon\dal.py in insert at line 844
Function argument list
(self=<gluon.dal.TeradataAdapter object>, table=<Table {'ALL':
<gluon.dal.SQLALL object at 0x01C...rewTest3', '_format': None,
'virtualfields': []}>, fields=[(<gluon.dal.Field object>, None),
(<gluon.dal.Field object>, 'DebugTest'), (<gluon.dal.Field object>,
None)])
I've changed the ID fields between integer and string, but they both
return NULL.
P.S. this may becoming more of a developer issue than a user one.
P.P.S. Excellent work by the way. This is one of the most
professionally documented and well structured applications I've worked
with. It is a pleasure to be using it.
Thanks