Explorar el Código

Apparently character sets are not supported in domains

Reinier Olislagers hace 11 años
padre
commit
ceb4530506
Se han modificado 3 ficheros con 8 adiciones y 3 borrados
  1. 4 1
      comparison.pas
  2. 1 1
      main.pas
  3. 3 1
      scriptdb.pas

+ 4 - 1
comparison.pas

@@ -474,9 +474,12 @@ begin
         // Check constraint, if any:
         if CheckConstraint <> '' then
           Line:= Line + ' ' + CheckConstraint;
-        // Character set for text types, if any:
+
+        { Character sets not supported for domains apparently at
+        least not in Firebird 2.5
         if CharacterSet <> '' then
           Line:= Line + ' CHARACTER SET ' +  CharacterSet;
+        }
         // Collation for text types, if any:
         if Collation <> '' then
           Line:= Line + ' COLLATE ' +  Collation;

+ 1 - 1
main.pas

@@ -1266,7 +1266,7 @@ begin
     begin
       if (Pos('char', LowerCase(fmNewDomain.cbType.Text)) > 0) or
         (LowerCase(fmNewDomain.cbType.Text)='cstring') then
-        meQuery.Lines.Add('default ' + QuotedStr(fmNewDomain.edDefault.Text))
+        meQuery.Lines.Add('DEFAULT ' + QuotedStr(fmNewDomain.edDefault.Text))
       else
         meQuery.Lines.Add('DEFAULT ' + fmNewDomain.edDefault.Text);
     end;

+ 3 - 1
scriptdb.pas

@@ -189,9 +189,11 @@ begin
     // Check constraint, if any:
     if CheckConstraint <> '' then
       List[i]:= List[i] + ' ' + CheckConstraint;
-    // Character set for text types, if any
+
+    { Character set is apparently not supported for domains, at least in FB2.5
     if CharacterSet <> '' then
       List[i]:= List[i] + ' CHARACTER SET ' + CharacterSet;
+    }
     // Collation for text types, if any:
     if Collation <> '' then
       List[i]:= List[i] + ' COLLATE ' +  Collation;