UNIDAC and SQL Server Geometry & Geography Data Types

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
b_yaghobi
Posts: 12
Joined: Tue 16 May 2006 06:55
Location: Iran-Tehran

UNIDAC and SQL Server Geometry & Geography Data Types

Post by b_yaghobi » Thu 12 May 2011 03:47

Hi,

Can you add this futures in UNIDAC?

Best Regards
Yaghoobi

AndreyZ

Post by AndreyZ » Fri 13 May 2011 07:57

Hello,

You can work with geometry and geography types in the following way:

Code: Select all

UniQuery.SQL.Text := 'insert into test_geo(id, geom, geog) values(:id, :geom, :geog)';
UniQuery.ParamByName('id').AsInteger := 1;
UniQuery.ParamByName('geom').AsMemo := 'LINESTRING(100 100, 20 180, 180 180)';
UniQuery.ParamByName('geog').AsMemo := 'LINESTRING(-122.360 47.656, -122.343 47.656)';
UniQuery.ExecSQL;
UniDAC provides server-independent interface for working with different databases. Geometry and geography are SQL Server specific types. It's better to use SDAC to work with these types, because SDAC has the corresponding functionality.

Post Reply