Download presentation
Presentation is loading. Please wait.
Published byΣωφρονία Μαρκόπουλος Modified over 6 years ago
1
Convert your Clarion App to SQL in Under Five Minutes
This webinar explores the process of converting a conventional Clarion application to SQL. See an example application with all data moved to SQL. Explore the differences in TPS and SQL. See some template development tricks. Jim Morgan - Mitten Software - mittensoftware.com
2
Things I can’t do… Help you lose 50 pounds in 30 days.
Help you make a million dollars tax-free each year while working part-time out of your home without effort. Sell you a pill to make you a bigger man with a more fulfilling sex life. Give you 20% of millions that you have coming from a deceased distant relative in Nigeria. Jim Morgan - Mitten Software -
3
Things I Can Do… Help you move to SQL in quickly and efficiently without writing a lot of code in hours, not weeks. Convert a Clarion program to SQL in 3 minutes, 12 seconds including: Database creation Data loading Program changes Jim Morgan - Mitten Software -
4
Personal Background Started using Clarion in 1987 (DOS 2.0)
Founded Mitten Software Professional services (SQL, Clarion, .Net, Biztalk) Clarion third party products Flexible Web Lists -.Net tool to build data driven web pages. Wrote Overlay Manager, Help Manager and published a number of Clarion 3rd party products including Boxsoft. Founded the Clarion Certification Program. Formerly with EDS and PWC consulting. MBA from University of Minnesota. Been doing SQL for over 10 years. Designed and developed programs in use by thousands of companies around the world. Jim Morgan - Mitten Software -
5
Outline Introduction Personal Background
Timed demonstration that converts the Clarion Invoice example programs to SQL. (No questions) Review code generation differences, discuss concepts. Converts a more complex real-world Clarion programs to SQL. Discuss power of templates. Highlight how non-Clarion code (i.e., SQL script) can be generated. Discuss ABC/Legacy difference and how ABC created DLLs can be consumed by Legacy DLL’s. Review SQL scripts. Review SQL conversion issues like Reserved words, Arrays, Groups, Date fields Conclusion Jim Morgan - Mitten Software -
6
Hold Questions – We’ll do it again.
Timed Demo Convert Invoice example programs to SQL. Set SQL options Build Program Create database Populate data Watch the movie….. Hold Questions – We’ll do it again. Jim Morgan - Mitten Software -
7
Review code generation differences, discuss concepts
Questions invited Compare the generated code Jim Morgan - Mitten Software -
8
SQL Connection String ! Include('SQLINIT.CLI') IF Glo:SQL GLO:OwnerString = CLIP(GETINI('Setup','SQLInfo','','.\[PgmName]SQL.INI')) If GLO:OwnerString Glo:Trusted = CLIP(GETINI('Setup','TrustedConnection','','.\[PgmName]SQL.INI')) Else GLO:OwnerString = 'Server,Database,User,Pass' !Default Owner String PUTINI('Setup','SQLInfo',GLO:OwnerString, '.\[PgmName]SQL.INI') Halt('Fix SQLInfo in the Setup Section of .\[PgmName]SQL.INI') End Message('SQL Trusted=' & Glo:Trusted & '/Owner=' & GLO:OwnerString, | !<= COMMENT ME = 'Remove This Message from SQLINIT.CLI') !<= COMMENT ME = Send(TestFile ,'/TRUSTEDCONNECTION='& Choose(Glo:Trusted=1,'TRUE','FALSE')) End !If Glo:SQL Jim Morgan - Mitten Software -
9
Convert real-world program to SQL
Exports Memo’s separate in TPS, in record in SQL Jim Morgan - Mitten Software -
10
Real-world Program to SQL (2)
Jim Morgan - Mitten Software -
11
Template Power Discuss how non-Clarion code (i.e., SQL script) can be generated. Templates generate text files. Templates can use many built functions (i.e., Get/PutIni, Instring, etc.) TSQL is a text file. Jim Morgan - Mitten Software -
12
ABC/Legacy Differences
ABC Applications Legacy Applications Have classes with standard header (*.inc) files found in \Libsrc. Conventional approach is to export all the classes with the file definitions. ABC created DLLs can be used by Legacy DLL’s (with a little help). No need to export ABC Classes File::Used/CheckOpen() can be created and Exported Don’t use file access classes, notably Relate/Access Classes. Use CheckOpen() with a [filename]::Used variable to track file opens. ABC created DLLs cannot use Legacy DLL’s for file exports. Jim Morgan - Mitten Software -
13
Review TPL generated SQL scripts
Table Create Grant Access Indexes Foreign Key Constraints Triggers Cascade Update Cascade Delete Conversion Programs Purge AutoInc records created by Clarion Purge Orphans Jim Morgan - Mitten Software -
14
Review SQL conversion issues
Reserved words Reserved words can be used as Table/Field names, but creates a bad situation. Much easier to rename initially Arrays Memo’s Blob/Cstring (varchar) /String (char)/Other Group’s and Over’s ignored for Select statements Auto handled by Clarion (i.e., DateTimeStamps) Date fields SQL support “Date” Type. Earlier versions are DateTime or Int (Long) Jim Morgan - Mitten Software -
15
Review SQL conversion issues - II
Owner (Connection) String. Server Database TrustedConnection OR User/Password Method of data conversion Create script with insert strings programmatically created. 2 Steps (create/run script), but can be faster overall Can use more native SQL commands to control outputs Classic conversion program (i.e., dictionary conversion) Tools (FM3, DMC) Jim Morgan - Mitten Software -
16
TPS -> SQL Application Code Issues
Get Pointer (any pointer operation) z:Record = y:Record;z:Memo = y:Memo Set(Key, Key, Pointer) NO Set(Key, Key) OK Browse positioning with non-unique keys Transaction Frames (Lock/Unlock/Hold) Upper (NoCase) Keys/Filters Very Slow Encryption Table Creation Spotty Performance issues (indexes/constraints) Jim Morgan - Mitten Software -
17
How’s the SQL Conversion Done?
Template generated scripts from dictionary for: Table definition Grants Indexes Constraints Data conversion Templates make SQL compatible file definitions and connection code in Clarion from non-SQL definitions. SQL options come from configuration file. Jim Morgan - Mitten Software -
18
Benefits of This Approach
Tested code and scripts Fast conversions Elimination of Error-prone “monkey” work Real cost savings Jim Morgan - Mitten Software -
19
How Can you Benefit? Templates are offered in conjunction with professional services from Mitten Software. We oversee the conversion process. ½ day minimum when done remotely. Often 2-5 day project depending on size and composition of the database and experience level of support staff. We’re available long term to help with complex debugging and tuning issues and template updates. Jim Morgan - Mitten Software -
20
For More Information Jim Morgan Mitten Software Minnesota USA Jim Morgan - Mitten Software -
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.