Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Raw / VB / ADODB

Re: Raw / VB / ADODB

From: <tim_at_sagelogix.com>
Date: Thu, 31 Oct 2002 11:13:47 -0800
Message-ID: <F001.004F8D02.20021031111347@fatcity.com>


Barb,

Ask them to wrap RAWTOHEX() around the RAW column, which will convert the resulting datatype to VARCHAR2?

Hope this helps...

-Tim

> Solaris 8
> Oracle 8.1.7.3
>
> We have a field level_id defined as raw(5) in a table
> called objects. I can pull data from this table from
> sqlplus as follows:
> select name, obj_id, level_id from objects where
> level_id='0101010000' and name = '1X3HRJOHNSON'
>
> NAME OBJ_ID LEVEL_ID
> --------------- ---------- ----------
> 1X3HRJOHNSON 500583 0101010000
>
> The developer is not able to pull identifiable data from
> the raw column level_id using VB. His notes are shown
> below. We searched metalink and google, and cannot find
> an answer.
> Any help? Thanks!!
>
> Barb
>
> OK,
>
> I am using ADODB microsoft data objects version 2.7
>
> I am using Oracle odbc driver 8.01
> I am trying to extract a raw field that is described as
> level_id raw(5)
> Every field extracts correctly except level_id....
>
>
> Here is an example code excerpt
>
> Set oRS = CreateObject("ADODB.Recordset")
> sSQL = "Select distinct level_id from objects"
> oRS.Source = sSQL
> oRS.ActiveConnection = conn
> oRS.Open
> Do Until oRS.EOF
> For i = 0 To oRS.Fields.Count - 1
> If oRS.Fields(i).Type = 204 Then ' RAW
> field type
> strTemp = oRS.Fields(i).Value
> end if
> next
> oRS.movenext
> loop
>
> In SQLPLUS when we ran a query on a record we got
> level _id 0101010000 , the above vb program returned 971.
> SQLPLUS level_id 010A030000, vb returned 633...
>
>
> What is ODBC returning? is the value truncated
> somehow?
> does it need to be converted ?
> I think we are getting partial data and not the full
> length of the RAW field
> Is RAW(5) equivalent to 10 bytes ?
> SQLPLUS shows 10 positions on output ....
>
> HELP !!!
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com --
> Author: Baker, Barbara
> INET: bbaker_at_denvernewspaperagency.com
>
> Fat City Network Services -- 858-538-5051
> http://www.fatcity.com San Diego, California --
> Mailing list and web hosting services
> ----------------------------------------------------------
> ----------- To REMOVE yourself from this mailing list,
> send an E-Mail message to: ListGuru_at_fatcity.com (note
> EXACT spelling of 'ListGuru') and in the message BODY,
> include a line containing: UNSUB ORACLE-L (or the name of
> mailing list you want to be removed from). You may also
> send the HELP command for other information (like
> subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: tim_at_sagelogix.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Oct 31 2002 - 13:13:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US