|
|
Database Connector Class (16 Oct 2012)
- I'm still working on Database Connector Classes for the next Ubercode release. The way this
works is the Ubercode Developer Environment has a wizard (series of dialogs) where you choose a
datasource to connect to and choose the columns you want to see, then the wizard takes care of the
rest. This makes it very easy to work with most forms of data.
- Step 1 Use the wizard to choose the data source. This can be a local data file such as a
dBase file, XML data file, CSV file or a tab separated file. The data source can also be a table or
view in a SQL Server database or a MySQL database:
- Step 2 Review the columns in the data source and specify the primary key:
- Step 3 Choose the columns to be included in the connector class. When it's created the
connector class includes viewers to display the data in different ways (page by page view, or a
data grid view, or a custom view). The reason for choosing the columns is you may not want all
columns to be edited:
- Step 4 Finished! The last step in the wizard confirms the details and creates the
connector class. You can test the class, view the source code and add it to your program. Your
program can now call up the viewers in the connector class to work directly with the data source.
This gives Ubercode the same features found in enterprise class software. Here's the wizard showing
the final step:
The wizard is currently working with local data files, but it's not yet complete in regards to SQL
tables and views. You can test it out in the latest Trial Pack. All
feedback is welcome.
More work for v1.3 (28 Jul 2012)
- I continued working on the next release. Ubercode is now integrated with Microsoft SQL Server (all editions) and with MySQL (version 5 and later). Integration means you open a database using
SqlOpen, retrieve data, run commands using SqlCommand and finally close the database
using SqlClose.
- The next step in the integration is to automate creation of Ubercode classes that connect to
the database. You will be able to run a wizard that connects to a database, then you choose a table
or view, and the Ubercode Developer Environment auto-generates a class that edits the table. It has
taken a while to get this feature working, which is the reason for the delay in updating the
website.
- You can download the new Trial Pack now and get
experimenting!
Useful add-ons for the v1.3 release (17 Apr 2012)
- As part of the next release I added regular expressions to Ubercode. There are new functions
IsMatch(str,exp) and IsLike(str,exp). The IsMatch function does matches using
the normal regular expression syntax and IsLike does matches using Visual Basic LIKE syntax.
These functions are currently in the propedit unit, so add uses propedit near the top
of your classes to use regular expressions.
- Examples of IsMatch:
IsMatch("cat", "c[ao]t") = true
IsMatch("Sleeps in a cot", "c[ao]t") = true
IsMatch("dog", "c[ao]t") = false
IsMatch uses regular expression syntax with * for repeated characters, . for
single character matches, .* for a wildcard match, [...] for character classes,
[0-9] to match a single digit and ^ $ indicate the start and end of the string.
- Examples of IsLike:
IsLike("the big cat", "*cat") = true
IsLike("a big dog", "*big*") = true
IsLike("a small dog", "*big*") = false
IsLike uses VBA syntax where * is for a wildcard match, [...] is for character
classes, # matches a single digit and the start and end of string characters are not
needed.
- The Strchg (string change) function was retired and replaced with Strreplace
(string replace). The new function is much faster, especially where a large string has many small
substrings changed in it.
- I've done some work on MySQL integration. Ubercode programs can now connect to MySQL databases (v5 and later) and to Microsoft SQL Server. The MySQL installation
needs the MySQL ODBC drivers (32 bit
MSI) to be installed.
- All the Ubercode SQL example programs have been updated and tested using both databases.
- There's a new Trial Pack download which is jam packed with the
latest improvements. Download now and get coding!
More work on v1.3 release (25 Feb 2012)
- As part of the next release I made improvements to the Exec function. Exec can
now capture the output of any command line process. To do this, pass a file name to Exec and
when Exec returns the file contains the output of the process. This is useful for running
external utilities and capturing their output.
- Exec also returns the process handle. This allows the calling application to run
Exec in NOWAIT mode and to continue running. The caller can periodically check the process,
and when it has finished it can load the output and close the process handle. There are new example
programs to show these techniques.
- Fixed a problem in the debugger that made it difficult to debug code that uses timers. The
debugger was being wrongly re-activated whenever timer events occurred while the debugger was
active. To fix this the timer events are temporarily suspended while the debugger is active.
- Added a new OnError statement, intended for use in core run time library functions. This
allows the run time library to be used to create wrappers for built in functions, and to 'hold
back' the error for use by the calling code. This improves error handling, by causing errors to
happen closer to the real point of failure.
- There's a new Trial Pack download with the latest improvements.
You can download this now and get programming!
Happy New Year! (12 Jan 2012)
- I upgraded the printed copy of the LRM (Language Reference Manual) and organized on-demand
printing for it. As a result the Ubercode store now offers a printed
copy of the Language Reference Manual. This is a quality printed book describing how Ubercode
works, including details of the library commands, details of internal data formats, language design
principles and much more.
- I updated the website, Trial Pack and the PAD file to ensure all file names are in lower case.
Use of lower case is a de-facto internet standard which avoids problems caused by inconsistent use
of capital letters.
- Also I made it possible to extend the Trial Pack by adding a "Request extension" option. This
contacts Ubercode Software and requests an extended evaluation period.
- There is a new 2012 release of the Trial Pack which includes these
improvements and more. Download now and start writing your own apps.
|
|