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: Kev <someuser_at_hotmail.com>
Date: Wed, 06 Nov 2002 12:45:53 GMT
Message-ID: <5a8y9.12852$sP2.4868@sccrnsc02>


If u'r using 9.0.1.1.1 then u can always use the DBMS_METADATA.Get_DDL package to get this info instead of user_triggers. I know that doesn't answer u'r question just thought I would put that out there.

"Paul O. Schenker" <poschenker_at_smile.ch> wrote in message news:3dc411ee$0$700$5402220f_at_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 Wed Nov 06 2002 - 06:45:53 CST

Original text of this message

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