0 Replies Latest reply: Apr 3, 2013 8:54 AM by 102986 RSS

    OO4O VB6 and RAW

      Testing our new Oracle 11gR2 ( box (Win32).
      Client (XPSP3) with client. We have some old VB6 app.
      I've found a problem. Test case as follows:

      Create Table RTEST (
      pk Number(5),
      rcol RAW(16)
      ) Tablespace...

      Insert Into RTEST (pk,rcol) Values(1,HextoRaw('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'));

      Check with SQLDeveloper, 'RCOL' contains the correct value.

      Dim osess As OraSessionClass, odb As OraDatabase, ors As OraDynaset
      Dim s1 As String, s2 As String, i As Long
      Set osess = CreateObject("OracleInprocServer.XoraSession")
      Set odb = osess.OpenDatabase("testdb", "testuser/testpassw", ORADB_ORAMODE)
      Set ors = odb.CreateDynaset("Select * From RTEST Where pk=1", ORADYN_ORAMODE)

      and now in Immediate Window:

      s1 = ors("RCOL")

      Print vbshex(s1)
      "79797979797979797979797979797979" ?????

      For i=1 To 16: s2 = s2 & Chr$(AscB(Mid$(ors("RCOL"),i,1))): Next

      Print vbshex(s2)

      With the new ODAC ( the problem still exists.
      On the old box (11gR1) all OK.
      Note: vbshex(string) is an old user function, returns string content in hex notation.