I wish to create a local cursor, for reporting, from the data in two separate remote tables, each in their own database.
Database D1, table T1 holds Orders and ItemNo
Database D2, table T2 holds ItemNo and ItemDetail
Both tables are too large to consider bringing either down to my local machine in their entirity.
I currently do:
LcSearchString = “12345”
Handle1 = SQLConnect(“One”)
LcSQLCode1 = “select T1.Orders, T1.ItemNo FROM T1 WHERE T1.Orders = ?lcSearchString”
SQLExec(Handle1, lcSQLCode1, “Cursor1”)
Handle2 = SQLConnect(“Two”)
LcSQLCode2 = “select T2.ItemNo, T2.ItemDetail FROM T2 INNER JOIN Cursor1 ON T2.ItemNo = Cursor1.ItemNo”
SQLExec(Handle2, lcSQLCode2, “Cursor2”)
The above fails with a misleading message that is sort of the equivalent of file not found. I believe that the last SQLExec can’t see Cursor1
Any thoughts …
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only