Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

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

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/e45f2e01d1a4c91685256ccc00018975.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1