I'm not sure this happen for postgres but I think it's a bug.
I submit the issue #656.
http://code.google.com/p/web2py/issues/detail?id=656
On Feb 9, 1:58 pm, Niphlod niph...@gmail.com wrote:
that seems a float vs decimal problem
bottom line, I didn't get what is not working right
can you post the html generated by the form before submitting the record
and the beautified session ?
In order to avoid race conditions, web2py places some hidden fields in the
form and store a key in the session when accessing a edit form: seems that
this fields don't match, hence the
uhm, this is the relevant part for the form I was asking for
input name=_formkey type=hidden
value=ce992b3a79f9c18f92ec284b9bd443afinput name=_formname
type=hidden value=Employee/{#39;EmployeeCode#39;:
Decimal(#39;61339#39;)}
for the session , just put {{=BEAUTIFY(session)}} into the template
You're right !
I thought it doesn't matter but it does.
I define another table which has a same field type for key and
works !!
But I employee table doesn't work even I changed from 'string' to
'double'
SyntaxError: user is tampering with form's record_id:
{'EmployeeCode': '61339.00'} !=
that seems a float vs decimal problem
bottom line, I didn't get what is not working right now ?
PS: post table definition in raw sql, model of the table as in the
models.py, and controller, so I can at least try to reproduce with sqlite
or postgres (again, sorry but I don't have DB2
Thank you the help.
So far, I found...
- Ver 1.99.2 doesn't support update for primarykey
- Ver 1.99.4 does support update for primarykey if it's string
So this will fail. If it works for posgres and maybe problem with db2/
mssql. (I use DAL: mssql2). From the syntax error, it's ignore the
Oh.. mabybe this ??
http://www.web2py.com/books/default/chapter/29/6?search=primarykey#Legacy-databases-and-keyed-tables
The update_record function is not available for Rows of keyed
tables.
Then what option do I have to update the table ?
On Feb 8, 1:45 pm, Omi Chiba ochib...@gmail.com wrote:
Do you have a compatible DMS?
Yes, I'm using DB2.
On Feb 8, 2:01 pm, Richard Vézina ml.richard.vez...@gmail.com wrote:
ote that currently this is only available for DB2, MS-SQL, Ingres and
Informix, but others can be easily added.
At the time of writing, we cannot guarantee that the
Maybe the :
migrate=False
I don't see it in your model so maybe web2py try to modify you database??
I have never use keyed table since web2py is not designed for and strongly
suggest to migrate data into a surrogate refactored database model...
Richard
On Wed, Feb 8, 2012 at 3:07 PM, Omi
I tried with both sqlite and postgresql and it works as expected. Are you
sure you are using the last version of web2py ? exceptions and line number
don't match with 1.99.4 (that is the version I tested for your sample code,
the only different thing is that I don't have a DB2 instance
Good point.
I was using ver 1.99.2. I tried with the 1.99.4 and now It shows a
different error for the same contoller. Hm... strange.
Contoller (update:NG)
--
def test():
return dict(form=crud.update(db.IQWAGFTY,
db.IQWAGFTY(db.IQWAGFTY.TYPRCD=='000115126002200')))
I mean on version 1.99.2, I got error when I access the
function(page). On version 1.99.4, I can access the function(page) but
got the error when I submit.
On Feb 8, 3:50 pm, Omi Chiba ochib...@gmail.com wrote:
Good point.
I was using ver 1.99.2. I tried with the 1.99.4 and now It shows a
12 matches
Mail list logo