- This topic has 4 replies, 3 voices, and was last updated 5 years, 9 months ago by
kimbomadsen.
-
AuthorPosts
-
-
March 25, 2020 at 20:28 #54573
Alexander Liberov
Participant- What is a Rewriter and where can I see documentation on it?
- Why is it only 32 bit? The component supports only Win32 target and not Win64.
-
March 25, 2020 at 20:58 #54574
mrluigi2017
ParticipantHi 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?
-
March 26, 2020 at 00:53 #54575
Alexander Liberov
ParticipantI 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.
-
March 26, 2020 at 09:16 #54576
mrluigi2017
ParticipantI 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.
-
April 14, 2020 at 15:11 #54640
kimbomadsen
KeymasterHi,
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:
{$IFDEF LEVEL16} [ComponentPlatformsAttribute({$IFDEF LEVEL26}pidLinux64 or{$ENDIF} {$IFDEF LEVEL23}pidiOSDevice64 or {$ENDIF} {$IFDEF LEVEL18}pidiOSSimulator or pidiOSDevice or {$ENDIF} {$IFDEF LEVEL19}pidAndroid or {$ENDIF} pidWin32 or pidWin64 {$IFDEF LEVEL17} or pidOSX32{$ENDIF})] {$ENDIF}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
Kim/C4D
-
-
AuthorPosts
- You must be logged in to reply to this topic.
