Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Comentário: Migration of unmigrated content due to installation of a new plugin
Composition Setup
import.css=/download/attachments/327912/newLayout.css
Portuguese

Pagetitle
MSParseError
MSParseError

Função: MSParseError

Retorna o último erro encontrado ao executar a função MSParse().

MSParseError ( ) --> cMensagemErro

cMensagemErro
    (caracter)
  • Retorna a mensagem de erro que ocorreu na última execução da função MSParse().
#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 += " isnull(g.proc_nome,'NAO DEVOLVIDO') local_dev, " + chr(13)
tSQL += " dateadd(hour, 2, b.data_saida) " + chr(13)
tSQL += " from tabela1 a, " + chr(13)
tSQL += " tabela2 b " + chr(13)
tSQL += " 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