Rewriter questions

Home Forums kbmMW Rewriter questions

Viewing 4 reply threads
  • Author
    • #54573
      Alexander Liberov
      1. What is a Rewriter and where can I see documentation on it?
      2. Why is it only 32 bit? The component supports only Win32 target and not Win64.
    • #54574

      Hi Alexander,

      As far as I know there is no specific documentation on the rewriter. The rewriter is needed when you use the ORM. It rewrites the SQL to match your target database requirements. It compiles on Win64 here without a problem (I am using enterprise) What version do you use? And what error do you get?

    • #54575
      Alexander Liberov

      I use latest kbmMW Enterprise with the latest Studio Architect. All Rewriter components on the panel are only Win32 so I cannot drag them onto form for Win64 project. I didn’t try yet to create them manually at runtime.

      It seems also there are possible bugs in InterbaseRewriter. Project <span>kbmMW\Demo\ORM\ImportDBSchema cannot create Delphi code because of errors originated there. I possibly fixed at least 3 but there are still more coming.</span>

      Do you use rewriter with Firebird/Interbase?

      Lack of documentation makes learning curve very steep.


    • #54576

      I had some issues with the ImportDBSchema as well so I wrote my own tool for Postgres databases. I am not sure if the import tool is fixed by now.

      I have used the kbmMWInterbaseSQLRewriter and it worked for me. It’s also important to connect a kbmMWInterbaseMetaData component to the Rewriter component. The metadata component takes care about things like uppercase/lowercase, the use of quotes, date layout, etc.

      I supspect that you didn’t build for 64 bit or that you forgot to set the correct paths.

    • #54640


      The rewriter is not 32 bit bound. However the code miss some attributes telling Delphi that it is so.

      Open kbmMWSQLRewriter.pas and put the following lines:

      in front of the definitions of TkbmMWGenericANSI92SQLRewriter, TkbmMWGenericANSI2003SQLRewriter, TkbmMWOracleSQLRewriter, TkbmMWMySQLRewriter, TkbmMWMSSQLRewriter, TkbmMWInterbaseSQLRewriter, TkbmMWPostgreSQLRewriter and TkbmMWSQLiteSQLRewriter.

      When you compile, the rewriter components will be available for all supported platforms.

      There were some fixes in the PostgreSQL rewriter last time. The Firebird/Interbase rewriter was checked a while back and worked ok at the time, but let me know what you have found.

      best regards

Viewing 4 reply threads
  • You must be logged in to reply to this topic.