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

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieve Trigger Source

Re: Retrieve Trigger Source

From: Ban Spam <ban-spam_at_operamail.com>
Date: Sat, 02 Nov 2002 17:41:36 GMT
Message-ID: <Xns92BA62A85711FSunnySD@68.6.19.6>


"Paul O. Schenker" <poschenker_at_smile.ch> wrote in news:3dc3e522$0$711$5402220f_at_news.sunrise.ch:

> Hi All,
>
> In order to retrieve the complete source of an existing ORACLE trigger
>
> with Visual Basic code via ADO I am aware that we have to use the
>
> GetChunk method of the ADO field object.
>
> Dim lngSize As Long
> Dim lngOffset As Long
> Dim varChunk As Variant
> Dim varAll As Variant
> Dim rs1 As New ADODB.Recordset
>
> rs1.Source = "select trigger_body from user_triggers where
>
> trigger_name = " & "'" & Me.DataCombo1.Text & "'"
> rs1.ActiveConnection = goConnection
> rs1.Open , , adOpenStatic, adLockOptimistic
>
> lngSize = 8000 'or: rs1.Fields(0).ActualSize ???
> Do While lngOffset < lngSize
> '**************************************
> varChunk = rs1.Fields(0).GetChunk(1000)
> '**************************************
> varAll = varAll & varChunk
> lngOffset = lngOffset + 1000
> Loop
> Me.RichTextBox1.Text = varAll
>
> With SQL*Plus, when I set the LONG environment variable to say 8000 I
>
> can get the whole <trigger_body> statement in one chunk. But why does
>
> my VB code above not work? I keep getting only the first 90 or so
>
> characters (the first 3 lines, truncated)!
> Any suggestions?
> Thanks in advance.
> Paul
>
>
>

Since you did NOT supply the Oracle version where you are having this problem, I'm not going to try to guess what might be a solution for you. Received on Sat Nov 02 2002 - 11:41:36 CST

Original text of this message

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