Hi, in my C++ application I make many calls to my Spatialite database and then all work fine. I use prepared statements and bind values, call Step, and go through the results. All great.
But I have the following statement which is giving me a “No database context” error which I don’t really know what it means. But I know the database is fine and working as other calls work okay.
The statement is:
SELECT ST_Distance( ST_Transform( MakePoint( ?,?, 4326), 32631), ST_Transform( MakePoint( ?, ?, 4326), 32631) ) / 1000 AS distance;
This statement runs fine in the command line interface. The prepare works without error. It just doesn’t like it at run-time.
Does anyone have thoughts on what might be the problem?
It is just doing a calculation and not retrieving any data but does that make a difference?
Best, Chris