Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB Extensions » View Thread |
Messages 1 to 8 of 8 total |
Reverse-Engineer to pascal code |
Sat, Jan 31 2009 1:04 PM | Permanent Link |
"Iztok Lajovic" | Hi all,
attached you will find a small project named SQLtoCode. I am it using to convert SQL code produced by EDBMGR Reverse-Engineering Database function to pascal unit. The steps to get a pascal unit are as follows: - run EDBMGR and select Reverse-Engineer Database procedure, select 'Generate as Generic Script' without including rows and create SQL file in the project's directory. - build and run SQLtoCode program: enter databaseName (for example MyBase), find the sql file produced in previous step and press 'generate unit' button. The resulting unit (named MyBaseDef.pas) is saved in the same directory as source SQL file is. Include name MyBaseDef in uses part of program and put right after opening database the sentence myBaseDefDat(myBase); The produced unit contains a series of query.execute sentences with table version control. There are two possibilities: - if particular table is not present, then the version control routine returns version number 0 and in this case the procedure generates the table. - if table is found and it's version number is the same then nothing happens - if the table version is smaller than the recent one then the unit has to be modified with code to alter the particular table to the newest table structure. The default parameters regarding sizes are put in one string named 'params' for readibility reasons. They can be modified before creating the unit. If someone wants to use in some tables different values then the string 'parameters' should be replaced ba definition strings of that string. The procedure is called allways after start of program if there is a statement directly after opening database without any additional control. In multiuser environment the first user makes by default all needed database administration and next users will have the newest version of all tables already prepared, if they run the same program, of course. All that means that you can have all possible control on tables structures in your program and there is no need to make any action by hand or using EDBMGR on remote location. There is no limit to use or even modify this project if someone wants to. I hope that somebody will find this project usefull. Regards Iztok Lajovic KreS. Kreativni sistemi, d.o.o. Attachments: SQLtoCode.zip |
Wed, Feb 4 2009 3:25 PM | Permanent Link |
Lance Rasmussen Jazzie Software Team Elevate | Thank you Iztok,
Lance "Iztok Lajovic" <iztok.lajovic@amis.net> wrote in message news:8B18E770-8982-4AEE-B85D-BFB1CBFFF236@news.elevatesoft.com... > Hi all, > > attached you will find a small project named SQLtoCode. I am it using to > convert SQL code produced by EDBMGR Reverse-Engineering Database function > to > pascal unit. > > The steps to get a pascal unit are as follows: > - run EDBMGR and select Reverse-Engineer Database procedure, select > 'Generate as Generic Script' without including rows and create SQL file in > the project's directory. > - build and run SQLtoCode program: enter databaseName (for example > MyBase), > find the sql file produced in previous step and press 'generate unit' > button. The resulting unit (named MyBaseDef.pas) is saved in the same > directory as source SQL file is. > > Include name MyBaseDef in uses part of program and put right after opening > database the sentence > myBaseDefDat(myBase); > > The produced unit contains a series of query.execute sentences with table > version control. > > There are two possibilities: > - if particular table is not present, then the version control routine > returns version number 0 and in this case the procedure generates the > table. > - if table is found and it's version number is the same then nothing > happens > - if the table version is smaller than the recent one then the unit has to > be modified with code to alter the particular table to the newest table > structure. > > The default parameters regarding sizes are put in one string named > 'params' > for readibility reasons. They can be modified before creating the unit. If > someone wants to use in some tables different values then the string > 'parameters' should be replaced ba definition strings of that string. > > The procedure is called allways after start of program if there is a > statement directly after opening database without any additional control. > In > multiuser environment the first user makes by default all needed database > administration and next users will have the newest version of all tables > already prepared, if they run the same program, of course. > > All that means that you can have all possible control on tables structures > in your program and there is no need to make any action by hand or using > EDBMGR on remote location. > > There is no limit to use or even modify this project if someone wants to. > I > hope that somebody will find this project usefull. > > Regards > Iztok Lajovic > KreS. Kreativni sistemi, d.o.o. > > |
Sat, Feb 7 2009 2:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | |
Wed, Sep 2 2009 10:56 AM | Permanent Link |
Daniel Kram | Good job! I like!
|
Tue, Nov 17 2009 9:00 PM | Permanent Link |
Peter | Iztok
Thank you for your unselfish donation. I have used it, and admired the code. It appears that there are some changes necessary for later builds of EDB (and I'm no EDB expert, so I may be wrong), but the last field name before a CONSTRAINT line appears to require a comma now, and the CREATE INDEX statements require a field name qualifier and an (optional) direction qualifier. I could modify the code, but I thought that I would bring it to your attention first. Regards Peter |
Thu, Nov 19 2009 6:23 AM | Permanent Link |
"Iztok Lajovic" | "Peter" <peter@petercrain.com> je napisal v sporočilo news:A37FC82B-44A7-47D5-B1BA-4891F5A9A9AF@news.elevatesoft.com ... > Iztok > > Thank you for your unselfish donation. I have used it, and admired the > code. It appears that there are some changes necessary for later builds of > EDB (and I'm no EDB expert, so I may be wrong), but the last field name > before a CONSTRAINT line appears to require a comma now, and the > CREATE INDEX statements require a field name qualifier and an (optional) > direction qualifier. > > I could modify the code, but I thought that I would bring it to your > attention first. > > Regards > > Peter > Peter, at present I have lot of work and have no time to modify and test Reverse-Engineer to Pascal Code regarding new versions of EDB. Please, do the changes by yourself and then publish them in this newsgroups. Thanks for kind words Iztok Lajovic |
Wed, Jan 13 2010 3:21 AM | Permanent Link |
Paul | Hi Iztok,
Can you Re-Upload SqltoCode.zip. I can't download it. It Seems that it don't exists. Thank's in advance. |
Wed, Jan 13 2010 4:37 AM | Permanent Link |
Paul | It's Ok I have downloaded it Now. Thank's.
|
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |