Browse Source

sqliteds: Ensure unique names in fielddefs

git-svn-id: trunk@32753 -
blikblum 9 years ago
parent
commit
6189686c6d

+ 1 - 1
packages/fcl-db/src/sqlite/sqlite3ds.pas

@@ -237,7 +237,7 @@ begin
       AType := ftString;
 	  DataSize := DefaultStringSize;
     end;
-    FieldDefs.Add(String(sqlite3_column_name(vm, i)), AType, DataSize);
+    FieldDefs.Add(FieldDefs.MakeNameUnique(String(sqlite3_column_name(vm, i))), AType, DataSize);
     //Set the pchar2sql function
     case AType of
       ftString:

+ 1 - 1
packages/fcl-db/src/sqlite/sqliteds.pas

@@ -184,7 +184,7 @@ begin
     begin
       AType := ftString;
     end;
-    FieldDefs.Add(String(ColumnNames[i]), AType, DataSize);
+    FieldDefs.Add(FieldDefs.MakeNameUnique(String(ColumnNames[i])), AType, DataSize);
     //Set the pchar2sql function
     if AType in [ftString, ftMemo] then
       FGetSqlStr[i] := @Char2SQLStr