PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 24 → Example to Run an MS SQL Stored Procedure with Windev, Webdev using HExecuteSQLQuery (Exemplo para Executar uma MS SQL Stored Procedure com o Windev, Webdev usando o HExecuteSQLQuery)
Example to Run an MS SQL Stored Procedure with Windev, Webdev using HExecuteSQLQuery (Exemplo para Executar uma MS SQL Stored Procedure com o Windev, Webdev usando o HExecuteSQLQuery)
Débuté par adrianoboller, 08 jan. 2015 17:28 - 8 réponses
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 08 janvier 2015 - 17:28
Example to Run an MS SQL Stored Procedure with Windev, Webdev using HExecuteSQLQuery (Exemplo para Executar uma MS SQL Stored Procedure com o Windev, Webdev usando o HExecuteSQLQuery)

CODIGO MSSQL:

--PEGA O VALOR DA ULTIMA CORRIDA

USE [producao]
GO

CREATE PROCEDURE NG0002_Procedure_UltimaCorrida
AS

DECLARE @num_corrida int;

SELECT @num_corrida = num_ultima_numera FROM numeracao WHERE ide_numera = 'ACT263_CORRIDA' AND num_ano_refere = year(getdate());

SELECT @num_corrida AS num_corrida;

return @num_corrida;

GO





CODIGO NO WINDEV, WEBDEV - USO EM WEBSERVICE:

//Executar procedure
numero_corrida is int = 0

MyProcedureUltimaCorrida is Data Source

IF HExecuteSQLQuery(MyProcedureUltimaCorrida, ConnNativa, hQueryWithoutCorrection,"NG0002_Procedure_UltimaCorrida") THEN

HReadFirst(MyProcedureUltimaCorrida, num_corrida)

WHILE HOut() = False
ok = HReadNext(MyProcedureUltimaCorrida, num_corrida)
numero_corrida = MyProcedureUltimaCorrida.num_corrida
END

ELSE
Error(HErrorInfo())
END

Trace(numero_corrida)


Veio valor sem dar erro no Trace()
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 08 janvier 2015 - 17:29
:merci:
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 08 janvier 2015 - 17:34
Informação Adicional:

http://doc.windev.com/en-US/…
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 09 janvier 2015 - 15:06
Danilo Valim:

Ficou lindo o programa rosinha e rodando certinho..hahahaha!!!

HClose(dsIntegraIn_Destino_Criar)

sCodeSqlStoredProcedure is string = [
Insert_IntegraIn X_Id_IntegraOut, X_Data, X_Hora, 'X_Sql', 'X_IP', X_Flag_Atualiza, X_Id_Filial, 'X_Usuario', 'X_Programa', 'X_Nome_PC', 'X_Nome_Procedure', XFlag_Erro
]

sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Id_IntegraOut",dsIntegraOut.Id_IntegraOut)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Data",dsIntegraOut.Data)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Hora",dsIntegraOut.Hora)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Sql",dsIntegraOut.Sql)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_IP",dsIntegraOut.IP)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Flag_Atualiza","0")
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Id_Filial",dsIntegraOut.Id_Filial)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Usuario",dsIntegraOut.Usuario)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Programa",dsIntegraOut.Programa)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Nome_PC",dsIntegraOut.Nome_PC)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"X_Nome_Procedure",dsIntegraOut.Nome_Procedure)
sCodeSqlStoredProcedure = Replace(sCodeSqlStoredProcedure,"XFlag_Erro","0")

//info(sCodeSqlStoredProcedure)

//dsIntegraOut.Id_IntegraOut+","+dsIntegraOut.Data+","+dsIntegraOut.Hora+","+dsIntegraOut.Sql+","+dsIntegraOut.IP+",0,"+dsIntegraOut.Id_Filial+","+dsIntegraOut.Usuario+","+dsIntegraOut.Programa+","+dsIntegraOut.Nome_PC+","+dsIntegraOut.Nome_Procedure+",0"
//IF NOT HExecuteSQLQuery(dsIntegraIn_Destino_Criar,gctConectar_Destino, hQueryWithoutCorrection, "Insert_IntegraIn "+dsIntegraOut.Id_IntegraOut+","+dsIntegraOut.Data+","+dsIntegraOut.Hora+",'"+dsIntegraOut.Sql+"' , '"+dsIntegraOut.IP+"' ,0,"+dsIntegraOut.Id_Filial+", '"+dsIntegraOut.Usuario+"' , '"+dsIntegraOut.Programa+"' , '"+dsIntegraOut.Nome_PC+"' , '"+dsIntegraOut.Nome_Procedure+"',0") THEN
IF NOT HExecuteSQLQuery(dsIntegraIn_Destino_Criar,gctConectar_Destino, hQueryWithoutCorrection, sCodeSqlStoredProcedure) THEN
Error("HFSQL error: " + HErrorInfo())
ELSE
Info("OK!")
END


Danilo Valim: fiz dessa forma...funcionou legal!!
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 09 janvier 2015 - 15:08
Minha Stored Procedure ficou assim:

[12:07:07] Danilo Valim:

CREATE PROCEDURE Insert_IntegraIn
(
@Id_IntregraIN Int,
@Data FLOAT,
@Hora FLOAT,
@Sql VARCHAR(4999),
@IP VARCHAR(49),
@Flag_atualiza TINYINT,
@Id_Filial Int,
@Usuario VARCHAR(49),
@Programa VARCHAR(49),
@Nome_PC VARCHAR(49),
@Nome_procedure VARCHAR(49),
@Flag_Erro TINYINT)
AS
Begin
INSERT INTO IntegraIn (ID_INTEGRAIn, Data, Hora, Sql, IP, Flag_atualiza, Id_Filial, Usuario, Programa, Nome_PC, Nome_procedure, Flag_Erro) VALUES
(@Id_IntregraIN, @Data, @Hora, @Sql, @IP, @Flag_atualiza, @Id_Filial, @Usuario, @Programa, @Nome_PC, @Nome_procedure, @Flag_Erro)
Posté le 09 janvier 2015 - 15:19
--CODIGO MSSQL:

CREATE PROCEDURE Insert_IntegraIn
(
@Id_IntregraIN Int,
@Data Float,
@Hora Float,
@Sql VARCHAR(4999),
@IP VARCHAR(49),
@Flag_atualiza Tinyint,
@Id_Filial Int,
@Usuario VARCHAR(49),
@Programa VARCHAR(49),
@Nome_PC VARCHAR(49),
@Nome_procedure VARCHAR(49),
@Flag_Erro Tinyint)
as
Begin
Insert into IntegraIn (ID_INTEGRAIn, Data, Hora, Sql, IP, Flag_atualiza, Id_Filial, Usuario, Programa, Nome_PC, Nome_procedure, Flag_Erro) Values
(@Id_IntregraIN, @Data, @Hora, @Sql, @IP, @Flag_atualiza, @Id_Filial, @Usuario, @Programa, @Nome_PC, @Nome_procedure, @Flag_Erro)
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 16 janvier 2015 - 12:34
USE [producao]
GO
/****** Object: StoredProcedure [dbo].[NG0001_Procedure_IncluirChamadaTaxi] Script Date: 01/14/2015 14:56:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[NG0001_Procedure_IncluirChamadaTaxi] @TIPO VARCHAR(3),
@cod_client_celulaint,
@nom_lograd_localVARCHAR(70),
@num_localint,
@des_comple_localVARCHAR(15),
@nom_cidade_origemVARCHAR(50),
@cod_lograd_entreg_encomeint,
@nom_lograd_entreg_encomeVARCHAR(50),
@num_local_entreg_encomeint,
@des_comple_local_entreg_encomeVARCHAR(15),
@seq_telefoint,
@cod_lograd_pesquiint,
@cod_tipo_carroint,
@qtd_carro_soliciint,
@cod_comuniint,
@nom_usuariVARCHAR(30),
@ide_ar_condicVARCHAR(1),
@ide_cartaoVARCHAR(1),
@cod_usuari_operadVARCHAR(10),
@num_ponto_refere_endereint,
@num_ponto_atendiint,
@num_unidad_atendiint,
@cod_centrl_telefoint,
@num_ramalint,
@ide_situac_client_call_centerint,
@cod_clientint,
@seq_autorzint,
@num_unidad_preferint,
@dat_hora_soliciDATETIME,
@qtd_minuto_anteciint,
@ide_priori_cadastint,
@cod_forma_pagameint,
@ide_encomeVARCHAR(1),
@ide_forma_seleca_corridVARCHAR(1),
@ide_porta_malas_grandeVARCHAR(1),
@XXX int,
@des_lograd_destinVARCHAR(120),
@num_lograd_destinint,
@des_comple_destinVARCHAR(40),
@des_prefer_corridVARCHAR(254),
@cod_client_convenint,
@cod_matric_convenVARCHAR(10),
@ide_forma_pagameVARCHAR(1),
@cod_forma_pagame_cartaoint,
@val_distan_destinint,
@val_tarifa_bandei_1int,
@val_tarifa_bandei_2int,
@finalidadeVARCHAR(50),
@observacaoVARCHAR(255),
@des_observ_intern VARCHAR(100)

WITH RECOMPILE

AS

SET NOCOUNT ON -- --> importante colocar

-- Start the transaction
BEGIN TRANSACTION

SAVE TRANSACTION NovaChamada -- Mark a save point

DECLARE @Error int;
DECLARE @cod_orgao VARCHAR(12);
SELECT @cod_orgao = '0';

--Numeracao
--###################################################################
UPDATE numeracao SET num_ultima_numera = (
SELECT num_ultima_numera
FROM NUMERACAO
WHERE ide_numera = 'ACT263_CORRIDA'
AND cod_orgao = @cod_orgao
AND num_ano_refere = year(getdate())
) + 1
WHERE ide_numera = 'ACT263_CORRIDA'
AND cod_orgao = '0'
AND num_ano_refere = year(getdate());
--###################################################################



-- Rollback the transaction if there were any errors
-- ########################################################################
SET @Error = @@ERROR
IF @@ERROR <> 0
BEGIN
-- Rollback the transaction
ROLLBACK

-- Raise an error and return
RAISERROR ('Error ao criar novo numero de corrida.', 16, 1)
RETURN @Error
END
-- ########################################################################

--PEGA O VALOR DA ULTIMA CORRIDA
DECLARE @num_corrid int;
SELECT @num_corrid = num_ultima_numera FROM numeracao WHERE ide_numera = 'ACT263_CORRIDA' AND num_ano_refere = year(getdate());
SELECT @num_corrid;



--DECLARE VARIAVEIS COM VALORES PADRAO DA TABELA: act263_corrida
DECLARE @ide_nao_fumant VARCHAR(1);
DECLARE @ide_carro_novo VARCHAR(1);
DECLARE @ide_exectv VARCHAR(1);
DECLARE @ide_fumant VARCHAR(1);
DECLARE @ide_insufi VARCHAR(1);
DECLARE @ide_cd VARCHAR(1);
DECLARE @ide_dvd VARCHAR(1);
DECLARE @ide_navegd_gps VARCHAR(1);
DECLARE @ide_intrnt VARCHAR(1);
DECLARE @ide_viagem VARCHAR(1);
DECLARE @ide_conexa_bateri VARCHAR(1);
DECLARE @ide_trocar_pneu VARCHAR(1);
DECLARE @ide_engate VARCHAR(1);
DECLARE @ide_jovem VARCHAR(1);
DECLARE @ide_nao_gas VARCHAR(1);
DECLARE @ide_situac_corrid VARCHAR(1);
DECLARE @ide_carro_alto VARCHAR(1);
DECLARE @ide_carro_baixo VARCHAR(1);
DECLARE @cod_usuari_cadast VARCHAR(10);
DECLARE @cod_usuari_cancel VARCHAR(10);
DECLARE @des_motivo_cancel VARCHAR(50);
DECLARE @cod_marca_veicul int;
DECLARE @cod_modelo_veicul int;
DECLARE @cod_motivo_cancel int;
DECLARE @num_call_center int;
DECLARE @seq_usuari_web_cadastint;
DECLARE @dat_hora_final_bloque DATETIME;
DECLARE @dat_hora_atendi DATETIME; --- verificar com o celio
DECLARE @dat_hora_inicio_nagyroDATETIME; --- verificar com o celio
DECLARE @dat_hora_cancel DATETIME;
DECLARE @dat_hora_ultima_alteraDATETIME;
DECLARE @dat_hora_arquiv DATETIME;
DECLARE @dat_hora_corrid DATETIME;
DECLARE @dat_hora_cadast DATETIME;

--Dados Origem
DECLARE @des_lograd_origem VARCHAR(70);
DECLARE @num_lograd_origem int;
DECLARE@des_comple_origem VARCHAR(50);

--Observacao
DECLARE@des_observ_comple VARCHAR(254);
DECLARE @des_observ VARCHAR(254);
DECLARE @des_observ_local_refere VARCHAR(254);

--


--Atribuindo valores
SELECT @cod_orgao = '1';

--Dados Origem
SELECT @des_lograd_origem = @nom_lograd_local;
SELECT @num_lograd_origem = @num_local;
SELECT @des_comple_origem = @des_comple_local;

--OBS
SELECT @des_observ_comple = @observacao;
SELECT @des_observ = @observacao;
SELECT @des_observ_local_refere = @observacao;



--Valores Default
SELECT @ide_situac_corrid = 'A';
SELECT @ide_nao_fumant = 'N';
SELECT @ide_carro_novo = 'N';
SELECT @ide_exectv = 'N';
SELECT @ide_fumant = 'N';
SELECT @ide_insufi = 'N';
SELECT @ide_cd = 'N';
SELECT @ide_dvd = 'N';
SELECT @ide_navegd_gps = 'N';
SELECT @ide_intrnt = 'N';
SELECT @ide_viagem = 'N';
SELECT @ide_conexa_bateri = 'N';
SELECT @ide_trocar_pneu = 'N';
SELECT @ide_engate = 'N';
SELECT @ide_nao_gas = 'N';
SELECT @cod_usuari_cadast = 'actumWS';
SELECT @ide_carro_alto = NULL;
SELECT @ide_carro_baixo = NULL;
SELECT @ide_jovem = NULL;
SELECT @cod_marca_veicul = NULL;
SELECT @cod_modelo_veicul = NULL;
SELECT @dat_hora_final_bloque = NULL;
SELECT @dat_hora_atendi = NULL; --- verificar com o celio
SELECT @dat_hora_inicio_nagyro = NULL; --- verificar com o celio
SELECT @cod_motivo_cancel = NULL;
SELECT @cod_usuari_cancel = NULL;
SELECT @dat_hora_cancel = NULL;
SELECT @des_motivo_cancel = NULL;
SELECT @num_call_center = NULL;
SELECT @seq_usuari_web_cadast = NULL;
SELECT @dat_hora_ultima_altera = year(getdate());
SELECT @dat_hora_arquiv = year(getdate());
SELECT @dat_hora_corrid = year(getdate());
SELECT @dat_hora_cadast = year(getdate());
SELECT @dat_hora_atendi = year(getdate());
SELECT @dat_hora_inicio_nagyro = year(getdate());


--#############
--cod_client_convencod_matric_conven no mobile vem do cadastro de clientes do mobile
--@cod_client_conven = x
--@cod_matric_conven = y
SELECT @cod_client_conven = cod_client_conven, @cod_matric_conven = cod_matric FROM dbo.ACT297_CLIENTE_CELULAR
SELECT @cod_client_conven;
SELECT @cod_matric_conven;
--#############

--Verifica integridade de dados
IF @qtd_carro_solici = 0
BEGIN
SELECT @qtd_carro_solici = 1;
END

IF LEN(@nom_cidade_origem) = 0
BEGIN
SELECT @nom_cidade_origem = 'Curitiba'
END



--Incluir Corrida
--###################################################################
INSERT INTO act263_corrida
(
num_ano_corrid,
num_corrid,
ide_situac_corrid,
dat_hora_corrid,
seq_telefo,
dat_hora_cadast,
cod_usuari_cadast,
cod_lograd_pesqui,
nom_lograd_local,
num_local,
des_comple_local,
cod_tipo_carro,
qtd_carro_solici,
cod_comuni,
nom_usuari,
ide_nao_fumant,
ide_nao_gas,
ide_ar_condic,
ide_cartao,
ide_carro_novo,
ide_exectv,
des_observ,
des_observ_local_refere,
cod_usuari_operad,
dat_hora_atendi,
num_ponto_refere_endere,
num_ponto_atendi,
num_unidad_atendi,
cod_orgao,
cod_centrl_telefo,
num_ramal,
ide_situac_client_call_center,
cod_client,
seq_autorz,
cod_usuari_cancel,
dat_hora_cancel,
des_motivo_cancel,
ide_fumant,
dat_hora_final_bloque,
num_unidad_prefer,
dat_hora_solici,
qtd_minuto_anteci,
ide_insufi,
des_observ_comple,
ide_priori_cadast,
cod_forma_pagame,
ide_encome,
cod_marca_veicul,
cod_modelo_veicul,
des_observ_intern,
cod_lograd_entreg_encome,
nom_lograd_entreg_encome,
num_local_entreg_encome,
des_comple_local_entreg_encome,
ide_cd,
ide_dvd,
ide_navegd_gps,
ide_intrnt,
ide_viagem,
ide_conexa_bateri,
dat_hora_inicio_nagyro,
ide_jovem,
ide_trocar_pneu,
ide_engate,
seq_usuari_web_cadast,
ide_forma_seleca_corrid,
ide_carro_alto,
ide_carro_baixo,
ide_porta_malas_grande,
num_call_center,
cod_client_celula
)
VALUES
(
year(getdate()),
@num_corrid,
@ide_situac_corrid,
@dat_hora_corrid,
@seq_telefo,
@dat_hora_cadast,
@cod_usuari_cadast,
@cod_lograd_pesqui,
@nom_lograd_local,
@num_local,
@des_comple_local,
@cod_tipo_carro,
@qtd_carro_solici,
@cod_comuni,
@nom_usuari,
@ide_nao_fumant,
@ide_nao_gas,
@ide_ar_condic,
@ide_cartao,
@ide_carro_novo,
@ide_exectv,
@des_observ,
@des_observ_local_refere,
@cod_usuari_operad,
@dat_hora_atendi,
@num_ponto_refere_endere,
@num_ponto_atendi,
@num_unidad_atendi,
@cod_orgao,
@cod_centrl_telefo,
@num_ramal,
@ide_situac_client_call_center,
@cod_client,
@seq_autorz,
@cod_usuari_cancel,
@dat_hora_cancel,
@des_motivo_cancel,
@ide_fumant,
@dat_hora_final_bloque,
@num_unidad_prefer,
@dat_hora_solici,
@qtd_minuto_anteci,
@ide_insufi,
@des_observ_comple,
@ide_priori_cadast,
@cod_forma_pagame,
@ide_encome,
@cod_marca_veicul,
@cod_modelo_veicul,
@des_observ_intern,
@cod_lograd_entreg_encome,
@nom_lograd_entreg_encome,
@num_local_entreg_encome,
@des_comple_local_entreg_encome,
@ide_cd,
@ide_dvd,
@ide_navegd_gps,
@ide_intrnt,
@ide_viagem,
@ide_conexa_bateri,
@dat_hora_inicio_nagyro,
@ide_jovem,
@ide_trocar_pneu,
@ide_engate,
@seq_usuari_web_cadast,
@ide_forma_seleca_corrid,
@ide_carro_alto,
@ide_carro_baixo,
@ide_porta_malas_grande,
@num_call_center,
@cod_client_celula );
--###################################################################


-- Rollback the transaction if there were any errors
-- ########################################################################
SET @Error = @@ERROR
IF @@ERROR <> 0
BEGIN
-- Rollback the transaction
ROLLBACK

-- Raise an error and return
RAISERROR ('Error ao incluir registro em act263_corrida.', 16, 1)
RETURN @Error
END
-- ########################################################################

IF @TIPO = 'MOB'
BEGIN

-- Incluir Chamada Taxi
--###################################################################
INSERT INTO ACT297_CHAMADA_TAXI
(
num_ano_corrid,
num_corrid,
cod_client_celula,
des_lograd_origem,
num_lograd_origem,
des_comple_origem,
nom_cidade_origem,
des_lograd_destin,
num_lograd_destin,
des_comple_destin,
des_prefer_corrid,
cod_client_conven,
cod_matric_conven,
ide_forma_pagame,
cod_forma_pagame_cartao,
dat_hora_ultima_altera,
dat_hora_arquiv,
cod_motivo_cancel,
val_distan_destin,
val_tarifa_bandei_1,
val_tarifa_bandei_2,
finalidade,
observacao
)
VALUES
(
year(getdate()),
@num_corrid,
@cod_client_celula,
@des_lograd_origem,
@num_lograd_origem,
@des_comple_origem,
@nom_cidade_origem,
@des_lograd_destin,
@num_lograd_destin,
@des_comple_destin,
@des_prefer_corrid,
@cod_client_conven,
@cod_matric_conven,
@ide_forma_pagame,
@cod_forma_pagame_cartao,
@dat_hora_ultima_altera,
@dat_hora_arquiv,
@cod_motivo_cancel,
@val_distan_destin,
@val_tarifa_bandei_1,
@val_tarifa_bandei_2,
@finalidade,
@observacao);
-- ########################################################################
END

-- Rollback the transaction if there were any errors
-- ########################################################################
SET @Error = @@ERROR
IF @@ERROR <> 0
BEGIN
-- Rollback the transaction
ROLLBACK

-- Raise an error and return
RAISERROR ('Error ao incluir registro em ACT297_CHAMADA_TAXI.', 16, 1)
RETURN @Error
END
-- ########################################################################


-- Commit the transaction....
COMMIT

RETURN @num_corrid
Membre enregistré
57 messages
Posté le 29 janvier 2015 - 17:16
Adriano - Are you asking a question or giving a tip? I apologize - I only read English and I can not tell from your code.

Here are a couple of things we have found in working with MSSQL and hExecuteSQLQuery.
We use this format hExecuteSQLQuery(datasource,connection,hQueryWithoutCorrection ,QryString)
When calling a stored procedure that may not return a value, issuing the hReadFirst may cause an error so we surround that in a When Exception
- When Exception in
hReadFirst(datasource)
DO
//nothing - the procedure returned no error
ELSE
// Process the returned data, check for SQL Error messages
END
----------------------
We have also found that including GO commands in the QryString can cause the remainder of the commands in the string to be ignored.
So we parse the entire script using the GOs as the string separators; sending each segment of the script or query separately and testing for return values on each segment.
---------------------
Here is a skeleton of our process -
//sFileString holds the entire Script
//We use a free form table to manage results during testing

FOR EACH STRING sScript OF sFileString SEPARATED BY CR + "GO"

IF HExecuteSQLQuery(dsQRYResults,ms1.ctActiveconn,hQueryWithoutCorrection,sScript) THEN
TABLE_FieldInfo..BrowsedFile = dsQRYResults

WHEN EXCEPTION IN
nTestnbr is int = dsQRYResults..NbItem
// hReadFirst(dsQueryResults)
DO
Trace("Exception - the script completed")
//EDT_Results += "Part "+PROGBAR_Script+ CR + "Command(s) completed successfully."+CR

ELSE
//The script returned values! - These couild be expected or an error msg - Show whatever returned.
BuildBrowsingTable(TABLE_FieldInfo,dsQRYResults,taFillTable) //
TableDisplay(TABLE_FieldInfo,taInit)
ColName = TableEnumColumn(TABLE_FieldInfo,1)
FOR EACH ROW OF TABLE_FieldInfo
EDT_Results += {"TABLE_FieldInfo."+ColName}
END
TABLE_FieldInfo..Visible = True
END
ELSE
Trace("HSQ Error")
WriteErrLog(SysDateTime()+"Critical Error in script:"+p_Title+CR+"Desc:"+p_Description+CR+"Auto="+gPAuto)
bFail = True
BREAK
END

END


Cheers,
Chris C

--
Sometimes waiting is the best way forward...
Membre enregistré
2 958 messages
Popularité : +89 (91 votes)
Posté le 29 janvier 2015 - 18:15
I usually post tips, rarely doubt, but as I am human can make mistakes, surely have a better way of doing I thank sending your comments because it helps everyone who has difficulties. Congratulations and thanks for the help!

:merci: