Results 1 to 6 of 6

Thread: Problem with Oracle BLOB field in VB

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Location
    Kolkata, India
    Posts
    6

    Question Problem with Oracle BLOB field in VB

    Hi,

    I have a VB 6.0 application with a backend Oracle 8i Database.
    A piece of code in this application is throwing me an error:

    Err.Number = -2147467259
    Err.Description = Data Type is not supported.


    I must mention the following:
    1) I am using Microsoft ActiveX Data Objects 2.6 Library

    2) The DB has a table named MyPicTable with the following structure:
    Code:
    Create Table MyPicTable 
    (
    Pic_ID NUMBER(10)
    , Pic_Image BLOB
    )
    3) I am using MSDORA as connection Provider as follows:
    (I must mention that I am getting a connection to the DB! That's OK! Also, using this connection string is a compulsion!!)

    VB Code:
    1. ' ************************************************** *********
    2. ' serverName, dbUID, dbPWD are variables defined elsewhere
    3. ' serverName will be in the format 127.0.0.1
    4. ConnectStr = "Provider=MSDAORA;Server=" & serverName & ";User ID=" & dbUID & ";Password=" & dbPWD & ";"
    5. Set myConn = New ADODB.Connection
    6. With myConn
    7. .ConnectionString = ConnectStr
    8. .CursorLocation = adUseClient
    9. .Open
    10. End With
    11.  
    12. ' ************************************************** *********
    13. Dim myRS As New ADODB.Recordset
    14. Dim strSelectSQL As String
    15.  
    16. Set myRS = New ADODB.Recordset
    17. strSelectSQL = "SELECT * FROM MyPicTable WHERE 1=2"
    18.  
    19. ' This line of code causes the error
    20. ' Err.Number = -2147467259
    21. ' Err.Description = Data Type is not supported.
    22. myRS.Open strSelectSQL, myConn, adOpenForwardOnly, adLockOptimistic

    Could anyone kindly throw some light as to why the application is throwing this error...

    Thanks in advance,
    Nilanjan.
    Last edited by nilug_123; Mar 26th, 2005 at 01:37 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width