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
'integer' from define_table and always tried with string...

Table on MSSQL
-----------------------
CREATE TABLE [dbo].[Test](
        [mykey] [int] NOT NULL,
        [myvalue] [varchar](50) NULL,
 CONSTRAINT [PK_Test] PRIMARY KEY CLUSTERED
(
        [mykey] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

Add Record like

111|AAA

Model
-----------------------------
db.define_table('Test',
    Field('mykey','integer'),
    Field('myvalue'),
    primarykey=['mykey'])

Controller
-----------------------------
def index():
    form=crud.update(db.Test,db.Test(db.Test.mykey==111))
    return dict(form=form)

TRACEBACK
-----------------------------
SyntaxError: user is tampering with form's record_id: {'mykey':
'111'} != {'mykey': 111}




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 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 or MSSQL test db available)

Reply via email to