Árvore de páginas

Versões comparadas

Chave

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

Pagetitle

...

MSParseError

...

MSParseError

Retorna

...

o

...

último

...

erro

...

encontrado

...

ao

...

executar

...

a

...

função

...

MSParse().

Sintaxe

Bloco de código
collapsefalse
MSParseError()
--> cMensagemErro

Retorno

...

Nome

Tipo

Descrição

cMensagem

caractere

...

Retorna a mensagem de erro que ocorreu na última execução da função MSParse().

Exemplos

Bloco de código
languagecpp
themeEclipse
linenumberstrue
collapsefalse
USER FUNCTION TEST()
  TCLink()
  
  cInput := " Create Proccedure PROC_EXAMPLE(@outStr undefined(64) OUTPUT, @outValue int OUTPUT) As " + ;
            " Begin " + ;
  
#INCLUDE 'TOTVS.CH'
User Function TestM1()
Local tSQL := ""
Local sErro := ""
Local sSql := ""
tSQL += "create proc sp_Teste (@dtInicial char(10), @dtFinal char(18), @ben_id char(6)) " + chr(13)
tSQL += "as " + chr(13)
tSQL += "declare " + chr(13)
tSQL += " @id integer = 1, " + chr(13)
tSQL += " @din money, " + chr(13)
tSQL += " @hoje date " + chr(13)
tSQL += "begin " + chr(13)
tSQL += " select distinct " + chr(13)
tSQL += "
          
j.nav_n2 navio, " + chr(13)
tSQL += "
"   select @outStr = 'Teste' " + ;
         
isnull(g.proc_nome,'NAO
 
DEVOLVIDO')
 
local_dev,
 " 
+
 
chr(13)
tSQL += " dateadd(hour, 2, b.data_saida)
 select @outValue = 100 " +
chr(13)
tSQL += "
 ;
       
from
   
tabela1
 
a,
 " 
+
 
chr(13)
tSQL +=
 if " + ;
          
tabela2
 
b
 " 
+ chr(13)
tSQL += "
End "
    
where
 
a.dt_entrada
 
between
 
convert(datetime,@dtInicial,103)
 
and
 
convert(datetime,@dtFinal,103)
 
"
 
+ chr(13)
tSQL += " and a.cliente = b.cliente " + chr(13)
tSQL += "end " + chr(13)
tSQL += "go "
sSql := msparse(tSQL,"INFORMIX")
conout("Traduzido: ")
conout(sSql)
sErro = msparseerror()
conout("Erro encontrado: ")
conout(sErro)
conout("FIM")
return
Microsiga Protheus 8.11 , Protheus 10 , TOTVS Application Server 10 , ByYou Application Server
 
 
  cOutput :=  MSParse(cInput, "ORACLE")
  
  conout(MSParseError())
 
  TCUnlink()
RETURN

Veja também