Please note that the ClarionLive webinar link will be changing again! You must register again at the ClarionLive site.
Word of the day: PROP:SQL
PROP:SQL lets you send SQL statements directly to the back end database. These don't need to be just about data retrieval. They can be any kind of admin statement, bulk updates, etc.
Bruce's word of caution is that direct SQL statements aren't always portable. So try to keep all your PROP:SQL stuff in one place (e.g. one DLL). Also you probably don't ever want to let your users type in something that is going to be sent via PROP:SQL.
Other word of the day: SEND
This allows you to send commands to the file driver. The available commands are driver-specific. You can also use SEND to send an SQL command to the back end database.
WebGem of the day
The About Clarion Addins addin by Brahn Patridge will keep you notified of any updated and new addins.
Green means okay, yellow star means new, not installed, and orange means update available.
Coming up
Next week's webinar is on SQL migration, and the 18th will be on SQL import/export. Eventually Arnold will do a Thin@ presentation.
The ultimate SQL class
John Hickey (who kept saying he wasn't quite ready) presented his ultimate SQL class. Class features include:
- Executing MS SQL scripts from a file
- A flexible Query method
- Monitor queries with DebugView
- Monitor errors with DebugView
- Turn trace on/off
- And more!
You can download the class from ClarionLive. You will also need the ClarionLive debug class (choose the ones you want from the installer setup).
The ideal is to be able to handle many different kinds of SQL, but for now MS SQL is the target.
There are templates, as well as four classes (clw and inc files):
- UltimateSQL
- UltimateDB
- UltimateSqlStrnig
- UltimateString
Methods in the UltimateSQL class include the following:
- AddColumn
- AlterColumn
- BusyHandling
- Connect
- Construct
- Delete
- Destruct
- DropColumn
- DropDatabase
- DropDependencies
- DropTable
- ExecuteScript
- GatherAtOpen
- GetColumnLength
- HandleError
- IgnoreTruncation
- Init
- Insert
- Kill
- MSSQLQuery
- MultipleActiveResultSets
- MySQLQuery
- ODBCDirectQuery
- PostgresQuery
- Query
- Quote
- RemoveIllegalCharacters
- SaveStored
- SendDriverString
- SetQueryConnection
- SybaseQuery
- TableExists
- TestConnection
- Trace
- Truncate
- TurboSQL
- Update
- VerifyViaSelect
There are also a number of properties.
There's a sample app which gets installed to C:\Users\Public\Documents\SoftVelocity\Clarion8\accessory\VariableDebugger (for reasons that aren't immediately clear).
Those who downloaded the sample apps had some difficulty getting them compiled and running - you can get an updated sample app on the free downloads page.
John went through the app and showed some of its capabilities, including creating a database and modifying table properties including adding and removing columns.
He also went into some of the querying capabilities.
There was some discussion of refactoring, as the class is getting fairly large. It looks like this will be the subject of the May 25th webinar.