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

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP-how to save into LONG RAW from VB

Re: HELP-how to save into LONG RAW from VB

From: Brian Grosheim <bgrosheim_at_medplus.com>
Date: 1997/10/07
Message-ID: <343a5266.8111023@news.one.net>#1/1

On Fri, 03 Oct 1997 22:53:02 -0400, Reuben Cleetus <reuben_at_cerc.wvu.edu> wrote:

The only way I was able to use a LONG column in VB (and I am assuming LONG RAW will work the same way) (I am using Oracle Objects):



RETRIEVING:

 (Note: I have to retrieve this LONG value BATCH_INI_SETTINGS all by itself)

    Dim oBatchCursor As Object
    Dim sSQL as String

    sSQL = "select BATCH_INI_SETTINGS "
    sSQL = sSQL & " from CLASS "
    sSQL = sSQL & " where BATCH_ID=" & pBatchID
    Set oBatchCursor = goOraDatabase.DBCreateDynaset(sSQL, ORADYN_DEFAULT)

SAVING:

(I had to use ORADYN_DIRTY_WRITE to get it to work correctly)

    Dim oResultSet As Object
    Dim sINI as String

    sSQL = "select NAME,  BATCH_INI_SETTINGS, ... etc"
    sSQL = SSQL & " from CLASS where BATCH_ID=" & pBatchID
    sSQL = sSQL & " for update"

    Set oResultSet = goOraDatabase.DBCreateDynaset(sSQL, ORADYN_DEFAULT + ORADYN_DIRTY_WRITE)
     oResultSet.DBedit
     oResultSet.fields("NAME") = 'Whatever';
     oResultSet.fields("BATCH_INI_SETTINGS").Value = sINI
     oResultSet.DBupdate


Hope, this helps

Brian

>Hello,
> I am in desperate need for help in solving a problem I'm having in
>using Visual Basic to communicate values to a table in an Oracle 7.3
>database.
> I am using Visual Basic 5.0 (Professional Edition), and Personal
>Oracle 7.3
> I have no problem in communicating these values if the column data
>type in the table is Varchar2, Number, Date, etc. It is the Long Raw
>data type that gives me problems.
> As part of my work, I need to store a Java Class file in a LONG RAW
>type column, and later retrieve it to a local file and run it. This is
>where the problem arises: I don't know how to transfer this java Class
>file into a LONG RAW column.
> Is there a special way to do this in VB 5.0? Does Visual Basic have
>any built-in procedures to transfer a Binary file into a Long Raw data
>type?
> Can anyone please help me in solving this problem? I would greatly
>appreciate any help I can get, and kindly request that you reply
>promptly.
>
>Thanks a lot!!
>
>Sincerely,
>Reuben Cleetus
>reuben_at_cerc.wvu.edu
>
Received on Tue Oct 07 1997 - 00:00:00 CDT

Original text of this message

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