ODBC (OpenInsight 32-Bit)
At 12 FEB 2003 07:16:47PM Bob Watson wrote:
I'm trying to use ADO to retrieve data from OI using the ODBC driver.
This works (I can read the whole table)
rs.Open "POMS_DEALING_TYPES", cn, adOpenStatic, adLockReadOnly, adCmdTable
This doesn't (Trying to use an SQL statement)
rs.Open "SELECT * FROM POMS_DEALING_TYPES", cn, adOpenStatic, adLockReadOnly, adCmdTable
The trace indicates that the driver is adding the 'select * from' syntax around the sentence.
I'm probably missing something simple here. Any help would be appreciated.
Thanks
Bob Watson
At 12 FEB 2003 07:46PM Bob Watson wrote:
Figured it out. Changing the last parm to 'adCmdUnknown' made it work
rs.Open "SELECT DESCRIPTION ,TYPE_REF FROM POMS_DEALING_TYPES", cn, adOpenStatic, adLockReadOnly, adCmdUnknown
Bob Watson
At 12 FEB 2003 08:08PM Bob Watson wrote:
Interesting that the field name that the recordset recognises is the column heading name eg..
rs.Fields("Land #").Value
The actual column is called LAND_NO
Any explanation for this?
Bob Watson