VB ADODB - Query incorrectly returns empty record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frensan
    New Member
    • Mar 2010
    • 1

    VB ADODB - Query incorrectly returns empty record

    Hello,

    Not sure if this is the right forum, apologies in advance if it isn't.

    I am using adodb to connect to oracle database. My VB script returns an empty record for a sql query, but when I issue the same query from SQL Developer or from sql command prompt, the query returns a row.

    The machine has MDAC 2.8 and Oracle 10 db. I read here http://www.mofeel.net/27-microsoft-public-data-ado/3080.aspx# that there is a known problem with MDAC 2.0.

    Line that is causing error ... dbresult = dbconnection.Ex ecute(sql)

    I ran it through a debugger, dbresult was null. After a couple of minutes, the value is populated in dbresult. dbresult.Field. Item("") is null initially, but shows up the value when i try it again. I added a wait 150 seconds to wait for dbResult to be populated in the script after the Execute() statement, but it din't help..

    Any pointers would be helpful.

    Thanks in advance.
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    Well 2.0 <> 2.8 and as for executing a query you should be using a recordset object as in openrecordset.. .



    Good Luck

    Comment

    Working...