Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> oracle spatial query with one spatial table and one standalone table in ado
I am trying to do a spatial query based on a radius. At the same time
I need to query another table that is related but has no spatial
information just a common id. My query works great in sql plus.
However, I get an error when attempting this in ado. The sql query
looks like this:
SELECT na.field1, na.field2, ko.field1, ko.field2, FROM mydatabase.table1withspatial na, mydatabase.table2standalone ko WHERE na.myid=ko.myid AND sdo_within_distance(na.shape,mdsys.sdo_geometry(2001,null,mdsys.sdo_point_type(myx,myy,null),null,null),'distance=500') = 'TRUE' ORDER BY ko.name
The vb code is essentially like the following:
Dim oconn As ADODB.Connection
Dim ors As ADODB.Recordset
Set oconn = New ADODB.Connection
Set ors = New ADODB.Recordset
dim conn as string
conn = "myconnectionstring"
oconn.Open conn
ors.Open sql, oconn, 3, 3
MsgBox oconn.Errors(0)
This gives the error:
[oracle][ODBC][Ora]ORA-24334: no descriptor for this position
Any help on why this error might occur would be greatly appreciated!! Received on Fri Dec 19 2003 - 11:14:12 CST
![]() |
![]() |