PowerBuilder Forum

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: ODBC to SpatiaLite


Newbie

Status: Offline
Posts: 2
Date:
ODBC to SpatiaLite


I want to send data for points and lines from Sybase to DotSpatial project using SpatiaLite.

 

ODBC connection between PowerBulder 11.5 Sybase SQL and SpatiaLite SQL works OK except for inserting/updating the spatial geometry datafield.

 

When running INSERT command directly inside spatialite GUI :

 

INSERT INTO newtbl (Geometry) VALUES (GeomFromText('LINESTRING (111 111,20 180,180 180)' ))

 

the geometry field looks like this:  BLOB sz=96 GEOMETRY

 

But when I run the same command with powerbuilder script the geometry field data looks like this: LINESTRING (100 100,20 180,180 180)

 

How to fire SpatiaLites function "GeomFromText" from PowerBuilder script. 

 

Please I need help on this.

Thanks, Vojko



-- Edited by vzavec on Monday 28th of May 2012 07:10:30 AM

__________________


Newbie

Status: Offline
Posts: 2
Date:

Now I find the correct syntax which works OK:

string wkt, name
wkt = 'LINESTRING(521510 125444, 521749 125370, 521894 125218)';
INSERT INTO pipes (pipe_name, Geometry) VALUES ( :name, GeomFromText(:wkt, 2170)) USING SQLCA_SP;
bye Vojko


__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard