HVR Forum

Simon
HVR
Simon
Offline
For certain datatypes (like SQL Server geometry types) HVR uses "extended datatype support" instead of native datatype support.
Here is how to setup replication (including capture and refresh) of such datatypes

Note that extra configuration is needed to replicate these columns.

In this example have a table t1:

CREATE TABLE [dbo].[t1](
[id] [int] IDENTITY(1,1) NOT NULL,
[geom1] [geometry] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

The table is added the channel. After adding this table to the channel you will see that the column is not present. You will need to add it manually in the Table Properties dialog. It needs to be added with the same name but with datatype clob.

The following actions are needed for HVR 4;

{ group=SRC table=* DbCapture /LogBased }
{ group=SRC table=t1 ColumnProperties /Name=geom1 /Absent /CaptureExpression="geom1.ToString()" /Context=refresh }
{ group=SRC table=t1 ColumnProperties /Name=geom1 /Absent /CaptureExpression="select t.geom1.ToString() from t1 t where t.id={id}" /Context=!refresh }
{ group=TGT table=* DbIntegrate }
{ group=TGT table=t1 DbIntegrate /DbProc /DbProcDuringRefresh }
{ group=TGT table=t1 ColumnProperties /Name=geom1 /CaptureExpression="geom1.ToString()" /IntegrateExpression="geometry::STGeomFromText({geom1},0)" }

The actions for HVR 5 are nealy the same;

{ group=SRC table=* Capture }
{ group=SRC table=t1 ColumnProperties /Name=geom1 /Absent /CaptureExpression="geom1.ToString()" /Context=refresh }
{ group=SRC table=t1 ColumnProperties /Name=geom1 /Absent /CaptureExpression="select t.geom1.ToString() from t1 t where t.id={id}" /Context=!refresh }
{ group=TGT table=* Integrate }
{ group=TGT table=t1 Integrate /DbProc }
{ group=TGT table=t1 ColumnProperties /Name=geom1 /CaptureExpression="geom1.ToString()" /IntegrateExpression="geometry::STGeomFromText({geom1},0)" }

As you see, I have 2 capture expressions on the source; with different context. One will be used during refresh (remember to activate it in the Context tab); the other one is used for replication.
On the target you need to use integration and refresh with database procedures for table t1
On the integrate we have an integrate expression and also a capture expression. The latter is needed to make HVR compare work.
Responses (0)
  • There are no replies here yet.
Your Reply