View Single Post
Old 06-20-2007, 01:43 PM   #1 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,140
Belisarius is on a distinguished road
Prepared Statements, SQL functions and MDB2

I'm using MDB2 for database connectivity on a project. I had been using DB, but that's depricated, and I figured there's no point in building something new based on a depricated framework.

Now, one of the things I do is create geo-spatial datapoints and insert them as values for query later. This is a unique datatype that is formed by calling an SQL function - the general format is "PointFromText(<lat> <lon>)".

Now, I want to create a prepared statment out of this, as I have a lot of points to enter. The problem is, I can't seem to use them in MDB2. The result is, according to the debugging output, "PointFromText(? ?)". That's literally it - it doesn't translate the "?" to a value as it does with the rest of the SQL statement. In DB, I used the "!" symbol, and it worked fine, but I can't get it to work under MDB2. I've even created a "types" array, and told it exactly what type it was (float). No joy.

Can anyone give me any ideas short of going back to DB?
__________________
GitS
Belisarius is offline   Reply With Quote