Solved

Problem with loading /sending a blob to oracle

Posted on 2001-07-17
5
421 Views
Last Modified: 2008-01-09
Hi All,
I use Oracle 8.1.7 and VB 6 and I want to send and load files from / to the oracle database...

On the line
Set OraSession = CreateObject('OracleInProcServer.XOraSession')

I got an runtimeerror 429
Cannot create Object with ActiveXComponents

Does anybody nows why or a better (easier) way to do this blob...

Special thanks 2u
George

P.S. in the registry on the W95 the OracleInprocServer is registerd!
0
Comment
Question by:geha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:VincentLawlor
ID: 6288996
Sounds like that the object you are trting to doesn't exist on the machine.

Habe a look for the key OracleInProcServer.XOraSession using regedit. If it's not there then the ActiveX object does not exist or is not registered on the machine.

Vin.
0
 
LVL 3

Accepted Solution

by:
nigelrowe earned 200 total points
ID: 6288999
Personally, I use ADODB to handle Oracle Blobs and Clobs (8.1.6). Here's an example of how (the field txtfield is clob the parameter txt_field is just a string, imgfield is blob image_array is a variant array)....

Private Sub InsertEntryField(ByVal id_entry As Long, ByVal od_field As Variant, ByVal has_children As Variant, ByVal od_father As Variant, ByVal tag_field As Variant, Optional ByVal txt_field As String, Optional ByRef imgage_array As Variant)
On Error GoTo ErrorHandler
Dim Conn As New ADODB.Connection
Dim Rs As ADODB.Recordset
Dim sqlclause As String

    sqlclause = "SELECT identry, odfield, haschildren, odfather, tagfield, txtfield, imgfield FROM entryfield WHERE 1 <> 1"
    Conn.Open Env.GetConnectionString
    Set Rs = New ADODB.Recordset
    Rs.Open sqlclause, Conn, adOpenKeyset, adLockOptimistic
    Rs.AddNew
    Rs.fields("identry").Value = SQLEncode(id_entry)
    Rs.fields("odfield").Value = SQLEncode(od_field)
    Rs.fields("haschildren").Value = SQLEncode(has_children)
    Rs.fields("odfather").Value = SQLEncode(od_father)
    Rs.fields("tagfield").Value = tag_field
    Rs.Update
    If Not IsMissing(txt_field) Then
        Rs.fields("txtfield").AppendChunk txt_field
        Rs.Update
    End If
    If Not IsMissing(imgage_array) Then
        Rs.fields("imgfield").AppendChunk imgage_array
        Rs.Update
    End If
    Rs.Close
    Set Rs = Nothing
    Conn.Close
    Set Conn = Nothing
    Exit Sub
ErrorHandler:
    Abort "InsertEntryField"
    Err.Raise Err.Number, Err.Source, RTErrDescription(TypeName(Me), "InsertEntryField", Err.Description)
End Sub

And heres a sub which calls the above in order to insert a blob....

Public Function Generateptabstract(ByVal a_tag As String, ByVal next_odfield As Integer, ByVal ty_role As Integer, ByVal vb_class As String) As Integer
On Error GoTo ErrorHandler
Dim abstracts As Collection, DocId As String, fname As String
Dim fhandle As Integer, binary_array As Variant, nextod As Integer
    nextod = next_odfield
    Set abstracts = GetDocumentsInCase(CStr(DM_DOCTYPE_PUBLISHEDABSTRACTOPI), CStr(idproc), "", "")
    If abstracts.Count = 0 Then
        Generateptabstract = next_odfield
        Exit Function
    End If
    DocId = abstracts.Item(1).Item(1)
    fname = ViewMainFile(DocId)
   
    fhandle = FreeFile
    Open fname For Binary Access Read As fhandle
    binary_array = InputB(LOF(fhandle), fhandle)
    Close fhandle
   
    InsertEntryField identry, nextod, 0, 0, "<abs>"
    nextod = nextod + 1
    InsertEntryField identry, nextod, 0, 0, a_tag, "binary", binary_array
    nextod = nextod + 1
    InsertEntryField identry, nextod, 0, 0, "</abs>"
    nextod = nextod + 1
   
    Generateptabstract = nextod
    Exit Function
ErrorHandler:
    Generateptabstract = 0
    Abort "Generateptabstract"
    Err.Raise Err.Number, Err.Source, RTErrDescription(TypeName(Me), "Generateptabstract", Err.Description)
End Function
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7153493
Hi geha,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: VincentLawlor@devx and nigelrowe

geha, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Author Comment

by:geha
ID: 7169326
Hi i will split points for eacha answer. thanxs a lot
0
 

Author Comment

by:geha
ID: 7169331
Hi I will split points
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question