Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
portuguese
Composition Setup
import.css=/download/attachments/3279126062824/newLayouttecnologia.css

Pagetitle
TCSPExist
TCSPExist

...

...

Função

...

verifica a

...

existência

...

de

...

uma

...

stored

...

procedure

...

no

...

banco

...

de

...

dados

...

atual.

Sintaxe

Bloco de código
collapsefalse
TCSPExist( <
cStoredProc> ) --> lRet 
 cStoredProc > )

Parâmetros

Nome

Tipo

Descrição

Obrigatório

Referência

cStoredProc

...

caractere

...

Nome da stored procedure a ser verificada.

X

 

Retorno

Nome

...

Tipo

...

Descrição

lRet

...

lógico

Retorna

...

.T.

...

se a stored procedure

...

existir, caso contrário,

...

retorna .F

...

Exemplos

...

Bloco de código
languagecpp
themeEclipse
linenumberstrue
collapsefalse
User Function test()

  Local cDBOra := "POSTGRES/dsn"
  Local cSrvOra := "localhost"
  
  TcLink(cDbOra,cSrvOra,7890)
  
  lRet := TCSPExist("PROC1")
  
  if lRet == .F.
    conout("Store Procedure not exist!")
  endif
  
  TcUnlink()
  
return lRet

Veja também

if TCSPExist('SP000001')
cStr:= 'DROP PROCEDURE '+ 'SP000001 '
TCSqlExec(cStr)
endif
Advanced Protheus 6.09 , Advanced Protheus 7.10 , Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10 , ByYou Application Server

...