3

我正在使用Grep Search在我的项目的所有 .pas 和 .dfm 文件中搜索表的名称。它只能在 .pas 文件中找到结果,而我确信至少有一个数据集使用该表。我在 .dfm 文件中搜索了数据集的名称,这就是我发现的:

  object DtsRPCondition: TADODataSet
    Connection = ConnMain
    CursorType = ctStatic
    CommandText = 
      'select FromDay, ToDay, ToTime, Daily, DayOfWeek from Tbl_Reserve' +
      'ValidDay'
   ...

这使得搜索 .dfm 文件毫无用处,因此我需要一个控制写入 .dfm 文件的选项或另一个可以处理此问题的搜索工具。

4

1 回答 1

2

You could convert the dfm files to binary, without overwriting the text dfm files using the Convert utility bundled with Delphi:

convert -b -s -ebin *.dfm

Where -b = binary output, -ebin means use bin (or whatever else you want) as the extension for the new files, and -s means recurse subdirectories.

This will create a "bin" file for eash DFM. As noted above, there will be no word wrapping in these. While they are binary they should be grepable, and can be used to identify which DFM's you need to look at.

于 2017-08-22T11:32:38.267 回答