Histórico da Página
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
DATABASE logix DEFINE m_query_componentreference VARCHAR(10) #------------------------------------------------------------------------------# FUNCTION LQUERY_teste() #------------------------------------------------------------------------------# DEFINE l_sql_stmt CHAR(500) DEFINE l_status SMALLINT DEFINE l_message CHAR(200) DEFINE lr_menu_logix RECORD data ARRAY[30000] OF RECORD LIKE menu_logix.* END RECORD DEFINE l_ind SMALLINT DEFINE l_length SMALLINT INITIALIZE lr_menu_logix.data,lr_menu_logix.* TO NULL # Monta o SQL que será executado pelo componente. LET l_sql_stmt = "SELECT cod_sistema,", "cod_nivel_1,", "cod_nivel_2,", "cod_nivel_3,", "num_sequencia,", "cod_processo,", "cod_tip_processo,", "cod_help,", "cod_transacao,", "den_transacao,", "chave_sistema", " FROM menu_logix", " WHERE cod_processo IS NOT NULL", " ORDER BY cod_processo" LET m_query_component = _ADVPL_create_component(NULL,"LQUERY") CALL _ADVPL_set_property(m_query_componentreference,"EVENT","LQUERY_testeEvent") LET l_status = _ADVPL_get_property(m_query_componentreference,"EXECUTE",l_sql_stmt,1,10,lr_menu_logix.data) IF NOT l_status THEN LET l_message = _ADVPL_get_property(m_query_componentreference,"ERRMESSAGE") CALL log0030_mensagem(l_message,"excl") END IF LET l_length = ArrayLength(lr_menu_logix.data) FOR l_ind = 1 TO l_length CALL CONOUT("MENU LOGIX "||lr_menu_logix.data[l_ind].cod_processo CLIPPED||".") END FOR CALL _ADVPL_destroy_component(m_query_component)reference) LET m_query_reference = NULL RETURN l_status END FUNCTION #------------------------------------------------------------------------------# FUNCTION LQUERY_testeEvent(l_ind) #------------------------------------------------------------------------------# DEFINE l_ind INTEGER DEFINE lr_menu_logix RECORD LIKE menu_logix.* LET lr_menu_logix.cod_sistema = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_sistema",l_ind) LET lr_menu_logix.cod_nivel_1 = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_nivel_1",l_ind) LET lr_menu_logix.cod_nivel_2 = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_nivel_2",l_ind) LET lr_menu_logix.cod_nivel_3 = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_nivel_3",l_ind) LET lr_menu_logix.num_sequencia = _ADVPL_get_property(m_query_componentreference,"VALUE","num_sequencia",l_ind) LET lr_menu_logix.cod_processo = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_processo",l_ind) LET lr_menu_logix.cod_tip_processo = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_tip_processo",l_ind) LET lr_menu_logix.cod_help = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_help",l_ind) LET lr_menu_logix.cod_transacao = _ADVPL_get_property(m_query_componentreference,"VALUE","cod_transacao",l_ind) LET lr_menu_logix.den_transacao = _ADVPL_get_property(m_query_componentreference,"VALUE","den_transacao",l_ind) LET lr_menu_logix.chave_sistema = _ADVPL_get_property(m_query_componentreference,"VALUE","chave_sistema",l_ind) CALL CONOUT("MENU LOGIX "||lr_menu_logix.cod_processo CLIPPED||".") RETURN TRUE END FUNCTION |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas