Browse Source

* Allow string fields to be used as primary key

git-svn-id: trunk@12991 -
blikblum 16 years ago
parent
commit
7f6b246136
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/fcl-db/src/sqlite/customsqliteds.pas

+ 3 - 3
packages/fcl-db/src/sqlite/customsqliteds.pas

@@ -1492,7 +1492,7 @@ begin
     begin
       TempItem := PDataRecord(FDeletedItems.List^[iItems]);
       SQLTemp := SQLTemp + (TemplateStr +
-        String(TempItem^.Row[FPrimaryKeyNo]) + ';');
+        FGetSqlStr[FPrimaryKeyNo](TempItem^.Row[FPrimaryKeyNo]) + ';');
       FreeItem(TempItem);
       Inc(StatementsCounter);
       //ApplyUpdates each 400 statements
@@ -1526,9 +1526,9 @@ begin
       SQLLine := SQLLine + (FieldDefs[iFields].Name + ' = ' +
         FGetSqlStr[iFields](PDataRecord(FUpdatedItems[iItems])^.Row[iFields]) +
         WhereKeyNameEqual +
-        String(PDataRecord(FUpdatedItems[iItems])^.Row[FPrimaryKeyNo]) + ';');
+        FGetSqlStr[FPrimaryKeyNo](PDataRecord(FUpdatedItems[iItems])^.Row[FPrimaryKeyNo]) + ';');
       SQLTemp := SQLTemp + SQLLine;
-      inc(StatementsCounter);
+      Inc(StatementsCounter);
       //ApplyUpdates each 400 statements
       if StatementsCounter = 400 then
       begin