瀏覽代碼

Warn on collation/character set changes that need manual action

Reinier Olislagers 11 年之前
父節點
當前提交
63c86b1603
共有 4 個文件被更改,包括 7 次插入11 次删除
  1. 2 3
      comparison.pas
  2. 3 2
      neweditfield.pas
  3. 1 5
      querywindow.pas
  4. 1 1
      tablemanage.pas

+ 2 - 3
comparison.pas

@@ -1352,11 +1352,10 @@ begin
         ScriptList.Add('and RDB$RELATION_NAME = ' + QuotedStr(ATableName) + ';');
       end;
 
-      // todo: Collation/character set changes: find a way to perform these
       if Characterset <> cCharacterset then
-        ScriptList.Add('-- WARNING: Character set changed from '+Characterset+' to '+cCharacterset+'. Please update manually.');
+        ScriptList.Add('-- WARNING: Character set changed from '+Characterset+' to '+cCharacterset+'. Please update manually (e.g. using the fbclone tool).');
       if Collation <> cCollation then
-        ScriptList.Add('-- WARNING: Collation changed from '+Collation+' to '+cCollation+'. Please update manually.');
+        ScriptList.Add('-- WARNING: Collation changed from '+Collation+' to '+cCollation+'. Please update manually (e.g. using the fbclone tool).');
 
       // Default value
       if DefaultValue <> cDefaultValue then

+ 3 - 2
neweditfield.pas

@@ -143,8 +143,9 @@ begin
         Line:= Line + '(' + IntToStr(seSize.Value) + ');' + LineEnding;
     end;
 
-    //todo: deal with character set change when updating field
-    //todo: deal with Collation change when updating field
+    //Character set and collation
+    Line:= Line + '-- warning: character set changed for field ' + edFieldName.Text + '. Please do this manually (e.g. with the fbclone tool)' + LineEnding;
+    Line:= Line + '-- warning: collation changed for field ' + edFieldName.Text + '. Please do this manually (e.g. with the fbclone tool)' + LineEnding;
 
     // Field Order
     if seOrder.Value <> OldOrder then

+ 1 - 5
querywindow.pas

@@ -474,7 +474,7 @@ begin
           end;
 
           // Update current record
-          // todo: high priority: add facility for inserting records
+          // todo: (high priority) add facility for inserting records
           if FieldsSQL <> '' then
           begin
             UpdateQuery.Close;
@@ -513,10 +513,6 @@ begin
               end;
             end;
             UpdateQuery.SQL.Add(WhereClause);
-            {$IFDEF DEBUG}
-            //todo: debug
-            SendDebug('going to run update query: '+Updatequery.sql.text);
-            {$ENDIF DEBUG}
             UpdateQuery.ExecSQL;
             (Sender as TBitBtn).Visible:= False;
 

+ 1 - 1
tablemanage.pas

@@ -169,7 +169,7 @@ begin
     FieldName:= Cells[1, Row];
     FieldType:= Cells[2, Row];
     FieldSize:= StrtoInt(Cells[3, Row]);
-    FieldScale:= -13; //todo support fieldscale in field editing!!!
+    FieldScale:= 0; //todo support fieldscale in field editing!!!
     AllowNull:= Boolean(StrToInt(Cells[4, Row]));
     DefaultValue:= Cells[5, Row];
     Description:= Cells[6, Row];