Menu

#17 problems with insert and update

open
nobody
None
5
2003-12-01
2003-12-01
No

I solved the problems with update with mssql

change:dbform.inc line 2675

// Lucas
// $qrysql = $conn->getUpdateSQL($rs,
$httpvars, $this->forceUpdateNulls, $this->magicQuote);
$qrysql = $conn->getUpdateSQL($rs,
$httpvars, $this->alwaysUpdate, $this->magicQuote);

Now still having problems with insert. The insert does
not fill the primary key field which is an identityfield.
do i have to add something extra to trigger dbforms to
use identityfunctionality

Here is the error:
(mssql): select * from tblrollen where (pk_roleid is null)
-------------------------------------------------------
-------------------------

-------------------------------------------------------
-------------------------
(mssql): INSERT INTO tblrollen ( pk_roleid, description1,
description2 ) VALUES ( null, 'aaa', 'aaa' )
-------------------------------------------------------
-------------------------

Warning: MS SQL message: Cannot insert explicit value
for identity column in table 'tblrollen' when
IDENTITY_INSERT is set to OFF. (severity 16) in
d:\vwaweb\cms\adodb404\drivers\adodb-mssql.inc.php
on line 591

Warning: MS SQL: Query failed in
d:\vwaweb\cms\adodb404\drivers\adodb-mssql.inc.php
on line 591
544: Cannot insert explicit value for identity column in
table 'tblrollen' when IDENTITY_INSERT is set to OFF.

-------------------------------------------------------
-------------------------
(mssql): select @@IDENTITY
-------------------------------------------------------
-------------------------

-------------------------------------------------------
-------------------------
(mssql): select * from tblrollen where (pk_roleid=)

Discussion


Log in to post a comment.

MongoDB Logo MongoDB