InterBase XE7 – Update 4

InterBase XE7 – Update 4

InterBase XE7 update 4 is now available for general release.

For notes on previous InterBase XE7 updates please select the links below

What’s new / updated in InterBase XE7 – Update 4?

In short. nothing new, just a few speed improvements and general fixes over update 3. Update 4:

  • Improve performance in a few specific query use cases,
  • Fixes a bug in IBConsole where databases may be created as dialect 1 rather than 3
  • Improves the partial backup feature.
  • Resolves a licensing lock issue on Windows 2012.

The resolved defects are documented on the InterBase XE7 DocWiki resolved defects page .

Downloading InterBase XE7 update 4

Embarcadero CodeCentral “Registered Users” can download the patch binaries (Server/Desktop/Developer/Trial) for Windows and Linux, and, ToGo Edition. You can find the downloads at http://cc.embarcadero.com/reg/interbase

For new users, the trial and developer editions are available for free at http://www.embarcadero.com/products/interbase/downloads

New Eddystone beacon format from Google

Google Eddystone™ beacon format

Give your users better location and proximity experiences by providing a strong context signal for their devices in the form of Bluetooth low energy (BLE) beacons with Eddystone™, the open beacon format from Google.

I found out today about a new Bluetooth LE beacon format that google have released called Eddystone.

This makes 3 formats for beacons along side AltBeacons and iBeacons.

The Eddystone format, like AltBeacons, is an open beacon format but allows the inclusion of additional data blobs with the beacon that can be updated once the beacons are deployed. A key part of this vision from Google is an integrated cloud based API’s that Google may well hope puts them at the centre of the growing beacon ecosystem.

Continue reading New Eddystone beacon format from Google

Using Azure Translator Services with Delphi

This content has been updated to reflect changes to the Microsoft API’s, including new Source Code. Read the latest and get the latest code from the updated blog post (linked above)

Often when building IoT applications there is benefit in linking to 3rd party services. e.g. Heating control systems may link to weather services to help detect external influences that may effect their operation. Typically these services are exposed via JSON and REST providing multi-platform access.

Microsoft Azure data services offer access to a wide range of datasets and services and in this blog post I will take you over my journey connecting to the Azure translator data service and achieving translation of text on Windows, Mac OS X, iOS and Android thanks to the REST components and helper classes in RAD Studio XE8.

About Microsoft Azure Translator Data

Microsoft Translator is a WEB API that enables Automatic Translation (Machine Translation) of text between any of the 50 supported languages

The Azure Translator data is used by Microsoft Office, Visual Studio, Bing and many more Microsoft products. It works over REST using a mix of JSON and XML to provide a number of services including translation and text to audio.

Continue reading Using Azure Translator Services with Delphi

Linking object/TValue to a control, VCL to FireMonkey

In this post, Tag properties and using Rtti.TValue data property as an alternative in FireMonkey / FMX.

Click / Select… now what?

One common challenge we face as developers is that the user clicks on something, we now need to find the object that is required to do the next task based on the item selected.

Sometimes this is from a dataset linked to the control and it may be taken care of for us, other times, we may need to find a specific object that then has the data we need.

Most of us have done it at some time….

Yes… that naughty little trick of using the tag property of a TComponent to store a pointer to an instance of an object that you want a quick way of reaching.

I remember doing this in a POS system where buttons that represented different stock items were linked to dynamically created screens. I also remember often using the TListView and thankfully, the TListViewItem in VCL had a Data property (of type Pointer) that you can set at runtime to an instance of an object. This was a little less naughty when moving to 64bit coding when Integer and Pointer all of a sudden became different sizes, (and if it wasn’t for some insight from the Delphi team to swap tag to NativeInt – lots of code would have broken).

The problem with a pointer property (or using a NativeInt to achieve the same goal) is that it leaves a lot of typecasting in your code, which never sat easy with me.

Continue reading Linking object/TValue to a control, VCL to FireMonkey

InterBase XE7 – Update 3

InterBase XE7 – Update 3

InterBase XE7 update 3 is now available for general release.

What’s new in InterBase XE7 – Update 3?

In my post about InterBase XE7 Update 2 I mentioned about the new reserve words that are used by Change Views and how to work with reserved words by using “quotes”.

  • CHANGE,
  • CHANGED,
  • INSERTED,
  • UPDATED
  • DELETED

With update 3, InterBase XE7 only adds these words to the reserved list once Change Views are active in the database. This will make it easier for users to migrate to InterBase XE7 and take advantage of the other cool features like partial data dumps, improved index handling etc.

What’s fixed in InterBase XE7 update 3?

The resolved defects are documented on the InterBase XE7 DocWiki resolved defects page .

 

Downloading InterBase XE7 update 3

Embarcadero CodeCentral “Registered Users” can download the patch binaries (Server/Desktop/Developer/Trial) for Windows and Linux, and, ToGo Edition. You can find the downloads at http://cc.embarcadero.com/reg/interbase

For new users, the trial and developer editions are available for free at http://www.embarcadero.com/products/interbase/downloads

Using Generics & RTTI to get enum string name or enum value

Overview

This blog post looks at Enums and how multi-platform generics and RTTI (or what C# guys call reflection) make this really simple using common code on Windows, Mac OS X, iOS and Android using Delphi.

Starting with what an Enum is, the post then explores how you would traditionally have seen it written in code, before looking at the clean X-platform approach RTTI and Generics provide.

If your experienced in working with enums and want to find out how RTTI makes it easier, you may want to skip the first part of this post and get to the section about RTTI further down.

Enumerated Types to and from strings

An Enum, or Enumerated Type is a data type with a set of named values.

Enums are a great way to define a set of constants that are specific for a type and work with them in context, ensuring only one, or an array of allowed values is set.

OK, I’m going to use an example that maybe should have more values listed, but you get the point. It is the points of a compass – North, South, East or West.

type
  TCompass = (North, South, East, West);

var
  D : TCompass; // short version for Direction 
begin
  D := TCompass.North;
  case D of 
    North : ShowMessage('North');
    South : ShowMessage('South');
    East  : ShowMessage('East');
    West  : ShowMessage('West');
    raise Exception.Create('Unknown Direction');
  end;
end;

This provides one way to convert a Enum to a string using a case statement, but every time you make a change to your Enum types, you need to add in extra code… Call me lazy, but thats too much work!

Continue reading Using Generics & RTTI to get enum string name or enum value

Important InterBase XE 7 – Update 2

InterBase XE7 – update 2

InterBase XE7 update 2 is now available for Windows and Linux server and ToGo. This update is highly recommended for all users of InterBase XE7.

For what is new and resolved issues in InterBase XE7 Update 2, please see the online InterBase documentation. – but in short, following update 1 with some change view enhancements – update 2 contains a number of fixes to general bugs reported.

Working with reserved words.

A list of Known Issues is available in the documentation. One that I will highlight is the addition of CHANGE, CHANGED, INSERTED, UPDATED and DELETED as reserved words in InterBase XE7 due to the introduction of Change Views.

I have heard of a few cases where developers have SQL statements that have stopped workings because their tables have fields that are one of the reserved words, e.g. UPDATED; Its easily to ensure those keep working by putting field names in “quotes” in your SQL statement.

As we know a lot of developers don’t quote their field names, we are working towards either a hot-fix or an update for the future that will only work with these as reserved words IF Change Views are being used, however it is recommended that you add “quotes” to the fields in your SQL if you are at all in doubt.

Download

For registered users, you can find the patch downloads at http://cc.embarcadero.com/reg/interbase

Server Edition

Windows
http://cc.embarcadero.com/item/30198

Linux
http://cc.embarcadero.com/Item/30199 

ToGo & IBLite Edition

Registered Users Downloads

Developer edition and Trial

https://downloads.embarcadero.com/free/interbase

 

What to do with Beacons before you code?

A beacon is a Bluetooth Low Energy device including some information in its advertising data.

Working with beacons requires code to read the beacons and some setup to ensure you read only the right beacons, especially as more and more are appearing! This article mainly focuses on the latter and what you should be aware of before you deploy your beacons.

Continue reading What to do with Beacons before you code?