Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

How do I insert or query geometry value with X DevAPI? (no replies)

$
0
0
I have a table which holds a POINT geometry field, now I need to insert value using connector/C++ 8. With normal SQL it's easy:
INSERT INTO geom(center) VALUES (ST_GeomFromText('POINT(1,2)'));
Question is how do I do the same with connector/C++ 8? I have tried using TableInsert like this:
auto insert = db.getTable("detection").insert("center").values("ST_GeomFromText('POINT(1,2)')");

or

db.getTable("detection").insert("center").values("POINT(1,2)");

Neither way worked, with exception message "CDK Error: Cannot get geometry object from data you send to the GEOMETRY field".

I need your help and appreciate for that.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>