Using WinMySQL Professional


Client generators - «WinMySQL Baby» apps for Windows®





Only accessible when connected and a table is active, the «Client generators>WinMySQL Baby apps for Windows®» submenu allows to generate Windows® applications which will be able to query MySQL® databases natively such as WinMySQL.


To be very efficient and extremely compact, WinMySQL Professional generates a kind of P-Code which will be performed by a runtime. So, to execute a WinMySQL baby application, the runtime must be installed on the Windows® client workstations. If your WinMySQL Professional package doesn't include the runtime («wmrt.exe» and «wmrt.dll»), you may freely download it at http://www.winmysql.com/download/wmrt.zip.


A WinMySQL baby application consists in a tabbed notebook including one or two tabbed cards (depending on the context). The first card is composed by datafields (which can be single boxes, listboxes, photofields, blob buttons ...) with its respective titles. The second card (if it exists) includes a query results grid, very similar to the WinMySQL Professional results grid. This visual component allows to display the user action results.


A WinMySQL baby application may include some WinMySQL Professional features such as printed reports, HTML reports, MS-Excel® CSVexports, blob support, JPEG display ...


To generate a WinMySQL baby application, the user may only indicate which columns on which table must be present on the first card and what actions (select, insert, update, delete ...) or user 's actions (custom queries) must be performed.


Of course, all is customizable : most of error messages, menus, field titles and especially the font. So, it is possible to generate a real application in the final user's language and characters set (latin, cyrillic, hebraic, greek ...).




How to install a WinMySQL Baby application runtime on a Windows® client ?


As shown as above, to allow a Windows® client to perform a WinMySQL Baby application, you must install the «wmrt.exe» runtime.


To do it, just copy the «wmrt.exe» and «wmrt.dll» files into the directory of your choice on the client workstation (for instance into «C:\WINDOWS\SYSTEM». Only one thing matters : these two files must be together in the same directory.


Once done, with the MS/DOS® box, go manually (with «CD» command ; for instance : «CD C:\WINDOWS\SYSTEM») to the directory where you have placed the runtime files and then, at prompt, type «WMRT /SET». Your runtime is now installed and operational : on this workstation, you will install as many WinMySQL baby applications as you want and anywhere, copying where you wish each WBA file resulting of the WinMySQL Professional applications generator. Then, to launch a WinMySQL baby application, just click on the corresponding WBA file.


It is also possible to launch a WinMySQL baby application without any runtime installation performed (for instance, if you wish to use a WinMySQL baby application on a Windows® NT workstation where you have no privileges to modify the registry database, or you simply don't want to process any modification of it), you may copy the runtime files «wmrt.exe» and «wmrt.dll» in the same directory than the folder where you have transferred your WBA file (the WinMySQL baby application file). You must rename your WBA file to «baby.wba». Then, to launch your WinMySQL baby application, just execute «wmrt.exe» (without any parameter).


In some cases, there is a third way to perform a WBA file. When you run a WinMySQL baby application which the «open binscript» menu is enabled, you may dynamically open another WBA file to change the current WinMySQL baby application (of course, in this situation, you'll automatically quit the current WinMySQL baby application and lose the current link to your MySQL® database !)


To customize each WinMySQL baby application, you may add «wmrt.ini» files to the WBA files (in the same directory). The «wmrt.ini» parameters are :



Paragraph [App] :


DefaultWidth= Integer which sets the WinMySQL baby app width when not maximized or minimized.

DefaultHeight= Integer which sets the WinMySQL baby app height when not maximized or minimized.

ShowSize= Boolean (0,1) which indicates whether the application layout must be displayed on the main caption.

InnerBorders= Integer (0,1,2) which indicates which parts of the application must be raised or lowered.



Paragraph [Jpeg] :


ColorDepth= String (0,4,8,16,TrueColor) which indicates the color depth if blobs are present on the card. «0» will set to gray with 8 bits depth.

ImageQuality= Integer (0 to 100) which sets the JPEG quality (in percent) if blobs are present on the card.

DefaultWidth= Integer which sets the JPEG width. The blobs must have been setup in WinMySQL Professional blob layout screen to get this value.

DefaultHeight= Integer which sets the JPEG height. The blobs must have been setup in WinMySQL Professional blob layout screen to get this value.

Stretch= Boolean (0,1) which indicates whether JPEG photos must be stretched to the setup layout if blobs are present on the card.

Progressive= Boolean (0,1) which indicates whether JPEG photos must be displayed progressively or in one step, if blobs are present on the card.



Paragraph [Data] :


ConfirmInsert= Boolean (0,1) which enables or disables the confirmation screen when inserting a new row in the current table.

ConfirmUpdate= Boolean (0,1) which enables or disables the confirmation screen when updating the current table.

ConfirmDelete= Boolean (0,1) which enables or disables the confirmation screen when deleting from the current table.

CompareWithLike= Boolean (0,1) which indicates if the queries must be exact (equal operator) or approximative (like operator). If true is selected, then the users may use percent and underscore characters as jokers in the datafields : for instance : «%alex%» returns all strings containing the «alex» substring such as «alexander», «vladimir alexandrovitch» ... or «project_» returns all strings starting with «project» but having one character after, such as «project1», «project2» but not «project».



Paragraph [Print] :


Preview= Boolean (0,1) which indicates whether a print preview must be displayed or not before any printing operation.

DefaultOffset= Integer which indicates (in inches) the offset form the left border of the report body. This setup is very useful to obtain correct printings.



Paragraph [Export] :


ColumnsDelimiter= Char which sets the columns delimiter for MS-Excel® CSV exports. The default is the semicolon «;».





How to uninstall a WinMySQL Baby application runtime from a Windows® client ?


To uninstall the runtime from a workstation, just manually go to the directory where the files « wmrt.exe » and « wmrt.dll » are installed and at prompt, type «WMRT /UNSET».




How to use a WinMySQL Baby application ?





With the runtime 1.0, WinMySQL baby applications are enhanced «database navigator styled». It means that the presentation consists in blank datafields which may be filled to ask questions to the database. Once filled, the form must be submitted by clicking the query button, and the result appears in the same form. If more than one row verifies the query, then navigation buttons (First record, previous record, next record, last record) enables. For instance, if the WBA file is set with the CompareWithLike parameter=true (default setup), submitting all blank datafield sends back all the records.




If «update», «insert» or «delete» actions are allowed for the final user, the respective buttons enable too on the navigator bar (according the context). To use a such button, data must be set before : for instance, you wish to modify the current «zipcode» and «city», change it first and then click on the update button.





Some queries may have been embedded in user action menus, then the results (if action requires a result) are displayed into a results grid which be accessed clicking on the second thumbnail of the tabbed notebook.


All data held in the results grid may be exported to CSV or HTML files if the «Export» menu is enabled.

These data may also be printed (if the «Print» menu is enabled) : you only must switch the tabbed notebook to the result grid card, otherwise, data from the individual card will be printed.






To upload a blob onto a database, check the link direction with the upload and download switching buttons on the navigation bar. To adjust the direction to upload, click on the «Switch to upload» button. To process the uploading operation, just click on the corresponding blob button.


To download a blob from a database, check the link direction with the upload and download switching buttons on the navigation bar. To adjust the direction to download, click on the «Switch to download» button. To process the downloading operation, just click on the corresponding blob button. If the concerned blob is a displayed JPEG photo, double-click on it.


To insert a row including blobs, it is necessary, first, to insert non-blob data and then to update the new insterted row with blob data.




How to create a Windows® application ?





To create a Windows®, click on the «Client generators>WinMySQL Baby apps for Windows®» submenu. It displays the application editor.


Step #1 (Required) : From the current table columns list, select the columns that you wish to include into the target application, by getting from the «Column list» box and putting into the «Fields in target» box.


Step #2 (Optional) : In the «Fields titles on the target screen» box, select by double-clicking, if you wish, titles to change it. Don't forget to click on the «Update» button to validate it. If you often manage the same columns, you may save or load the titles.


Step #3 (Optional) : If blob columns are selected, you may require JPEG automatic displaying for those which hold JPEG binary data inside. To do it, just select the requested columns by clicking on it on the «Fields in target» box and then by clicking on the «JPEG photo layout». In the layout display, you may choose to select manual setup, entering directly layout values (in pixels) that blob cannot exceed. You also may choose to setup the blob to force it to get dynamically layout value from the optional «wmrt.ini» file (please, see «wmrt.ini» parameters above). If you only want to obtain a «blob button» instead of a JPEG photo, just leave the layout display setup on «JPEG disabled» position


Step #4 (Optional) : If you wish to add a listbox to a field (for instance, a «cities» suggestions list for a column «City» ), click on the «Add listbox to some fields» button. Then select the column concerned. In the SQL editor, enter the SQL query that you wish to be performed and validate it by clicking on the «Update query» button. If a query receives more than one column, the first only will be processed. If the suggestions in the listbox are classic (for example, the alphabetic sorted list of the cities encoutered in the database for a field «City» ), you may click on the «Generic query» button which will generate automatically a such query (don't forget to validate it with the «Update query» button !). You also can import SQL queries with the «Load SQL query» button or save it if you wish use it into another WinMySQL baby application.


Step #5 (Optional) : You may want to add specific queries that the final user needs (such as lists, statistics ... ). To do that, click on the «Add query to custom menus» button. In a way, very similar with the step #4, enter the query to be embedded in the target application, writing SQL text in the SQL editor and then, click on the «Add action» button. You may add up to twelve user actions, named by default, in the target application menus «Action 1, Action 2 ...». These queries can be complex and include joined columns.


Step #6 (Optional) : You may indicate, checking the «Insert», «Update» or «Delete» checkboxes what are the allowed actions. The selected actions will be added into the target application menus and into the navigation bar. If the «Navigator style target app» checkbox is unchecked, it is possible to uncheck the «Select» checkbox, but this feature is unsupported by the runtime version 1.0.


Step #7 (Optional) : You may indicate, checking the «Font setup», «Print», «Export» or «Load script» checkboxes what are the feature menus that you wish to enable in the target application. «Export» and «Load script» are only applicable when at least one user action is defined.


Step #8 (Optional) : You may setup the target application launch mode checking or unchecking the «Target application starts maximized».


Step#9 (Required) : You must properly fill the connection parameters fields (located on the top left of the screen) and pointing out whether the target application will try to connect itself or will require authentication parameters (in this case, it will ignore the specified password by WinMySQL Professional)


Step#10 (Optional) : If you plan to generate a target application for final users who usually use another characters sets than latin (hebraic, cyrillic ...), you may select your own target font. To do it, click on the «Select target font» button and select the required font. This value affects all the target fonts excepted the menu fonts.


Step#11 (Optional) : In the target application, you may wish to customize the error messages, menu titles, ... You can do it by clicking on the «Menu titles & Msg override».


Step#12 (Required) : Click on the «Generate target application» button and choose the target WBA filename.



Note : You may modify a WBA file loading it by clicking on the «Load WinMySQL baby app» button. Once the changes are made, re-generate it with the «Generate target application» button.



Note about licences : The runtime doesn't require any licence to be used. However, WinMySQL Professional requires it. Then when a WinMySQL baby application is generated by an unregistered copy of WinMySQL Professional, the runtime will notify it one minute during the target application launch and each time the print feature is invoked.


To unlock the WinMySQL baby application once generated, just re-open it and re-generate it with a registered copy of WinMySQL Professional.




Documentation : WinMySQL Professional 1.16 - © 1999-2003 by Alexandre GOUVERNEUR