mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
SqlArray problem
git-svn-id: svn://ultimatepp.org/upp/trunk@627 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
997ab2d223
commit
e15b677a9b
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ bool SqlArray::PerformInsert() {
|
|||
ASSERT(IsCursor());
|
||||
SqlInsert insert(table);
|
||||
for(int i = 0; i < GetIndexCount(); i++)
|
||||
if(!GetId(i).IsNull())
|
||||
if(!GetId(i).IsNull() && (i || !IsNull(GetKey())))
|
||||
insert(GetId(i), Get(i));
|
||||
if(!fk.IsNull())
|
||||
insert(fk, fkv);
|
||||
|
|
@ -69,7 +69,7 @@ bool SqlArray::UpdateRow() {
|
|||
else {
|
||||
SqlUpdate update(table);
|
||||
for(int i = 0; i < GetIndexCount(); i++)
|
||||
if(!GetId(i).IsNull() && IsModified(i))
|
||||
if(!GetId(i).IsNull() && IsModified(i) && (i || lateinsert))
|
||||
update(GetId(i), Get(i));
|
||||
if(update) {
|
||||
Session().ClearError();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue