0 Replies Latest reply on Feb 27, 2003 12:27 PM by 388768

    OraField with wrong data type.

      Hi there,

      I'm having problems using the Oracle Objects for OLE (OO4O) with Visual Basic 6.0.
      Here is the code:
      SQL = "select ENAME, HIREDATE, SAL from emp where ename = 'ALLEN'"
      Set OraSession = CreateObject("OracleInProcServer.XOraSession")
      OraSession.CreateDatabasePool 1, 40, 200, "ExampleDB", "scott/tiger", 0
      Set OraDatabase = OraSession.GetDatabaseFromPool(10)
      Set OraDynaset = OraDatabase.DbCreateDynaset(SQL, 0)
      Print TypeName(OraDynaset("HIREDATE").Value)
      Print TypeName(OraDynaset("SAL").Value)

      The field 'HIREDATE' comes as DATE type and 'SAL' comes as STRING type.
      Here is the data base structure:
      HIREDATE     DATE (7) NULL
      SAL     NUMBER (7,2) NULL

      Why the field 'SAL' comes as STRING type instead of DOUBLE type? How can I fix this?