<$BlogRSDUrl$>

Thursday, August 23, 2007

Using VCL.NET with ECO IV in CodeGear RAD Studio 

As part of the Highlander Beta Blogging initiative, I have been given permission from CodeGear to demonstrate features and functionality of the up and coming CodeGear RAD Studio product.

As CodeGear are also currently running a video competition, I thought I'd use this unfair advantage to enter :-)

The following two videos (they were one, but had to be split in order to comply with YouTubes 10 minute limit) demonstrate a simple Master Detail application created in ECO using VCL.NET as the presentation framework. In the first video, the data is persisted to an XML file.



The second video extends upon this to change the persistence to write the data in a BlackfishSQL database.



I strongly encourage all readers/viewers to favour these videos. I can't guarantee any fame or fortune to come your way, but I will be sure to have a beer in your honour. Heck, if you ever get over to New Zealand, I may even be convinced to shout you one. :-)

UPDATE: I have uploaded the original video to CodeGear Developer Network. I would recommend watching this one rather than the two I submitted to YouTube. The content is the same, but there is no loss in resolution. Feel free to still vote for my YouTube submissions though. :-)

Labels: , , , , , ,


(3) comments

Friday, June 01, 2007

Inserting a record only once 

A few weeks back, my boss showed me a technique he uses when inserting a record into a FireBird table, which caters for the scenario that the record may already be there and therefore shouldn't be inserted. It was one of those simple yet elegant solutions, and I've been meaning to share it here. Well, I'm waiting for a data import process to finish, so I thought I'd take the time to finally do this.

The technique revolves around turning the concept of a left join on its head and using it to check for failure (i.e a null field value). Here is an example of what I'm talking about :-

insert into tax_category(category_description, tax_rate)
select 'GST', '12.5' from rdb$database
left join tax_category t
on t.category_description = 'GST'
where t.category_id is null;

The above snippet will attempt to insert a record into the tax_category table using a set of hard-coded values, but because of the left join and where clause, the recordset being used for the insert will be empty if the join finds an existing record in the table.

Labels: , , , , ,


(23) comments

This page is powered by Blogger. Isn't yours?