Unified SQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Unified SQL

Post by oz8hp » Mon 09 Nov 2009 12:10

I am trying to figure out a method of distributing updates to my endusers database and think I have to look at the unified SQL in UniDAC to get it working. But I miss some samples on how it works/can be made.

Or if there is a much better way of doing the job please let me know.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 10 Nov 2009 08:54

Please describe in more details what you mean by distributing updates.

You can find the description of Unified SQL in the UniDAC help (Using UniDAC / Unified SQL).

oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Post by oz8hp » Tue 10 Nov 2009 09:14

Distributing updates:

Customer have version 1.0.0 of application and db
I develop version 1.1.1 which uses 4 new fields and a new table in the db.
In order for customer to use the new 1.1.1 version his db needs to be upgraded and it is theese updates/upgrades I need to distribute with the new application so that customer can run an update the fixes his db.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 11 Nov 2009 08:55

You can use Unified SQL to write an update script, if this script has some differences for different DBMS.

oz8hp
Posts: 151
Joined: Mon 18 Feb 2008 13:28
Location: Denmark
Contact:

Post by oz8hp » Thu 12 Nov 2009 10:00

That was my plan - I just need some 'reallife' samples to look at :)

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Post by eduardosic » Thu 12 Nov 2009 11:58

oz8hp wrote:That was my plan - I just need some 'reallife' samples to look at :)

with UniQueryUpdate do begin
SQL.Clear;
SQL.Add( ' {if Oracle} ' );
SQL.Add( ' alter table dept add xxxxxxx ' );
SQL.Add( ' {else} ' );
SQL.Add( ' alter table test.dept add xxxxxxx ' );
SQL.Add( ' {endif} ' );
Execute
end;

Unidac will be execute the statment accordint with provider.

Unified SQL tecnology is a Big feature of Unidac.. good Devart!!

Post Reply