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: Paul O. Schenker <poschenker_at_smile.ch>
Date: Sat, 2 Nov 2002 18:53:36 +0100
Message-ID: <3dc411ee$0$700$5402220f@news.sunrise.ch>


Well, the Oracle Version I am using is: 9.0.1.1.1. And, the ADO library used is version 2.5 and my Visual Basic is Version 6.0, Service Pack 5

"Ban Spam" <ban-spam_at_operamail.com> wrote in message news:Xns92BA62A85711FSunnySD_at_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:53:36 CST

Original text of this message

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