<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>29 Nov 2019 12:31:09 Z</lastBuildDate><pubDate>28 Nov 2019 14:23:34 Z</pubDate><description>Hi  have Project working fine in Windev vrs 20 using SQl server native Driver&#13;
now we Update all the project to version 23 .&#13;
&#13;
Hi  this simple project is a piece of the main project just to test connection &#13;
has no Analisys, nothing, only a Main Forms to do a conecction and show if this OK&#13;
So  Running in developer Mode  or Debug mode  works fines &#13;
so the connection is done, the database is ok the server is on line (is this test i am using a local database)&#13;
&#13;
But when I generate the .EXE from this project and run  the connection FAILS&#13;
&#13;
Does any body here can help me?&#13;
&#13;
Tks&#13;
Carlos Lages&#13;
Dec&#13;
&#13;
&#13;
GLOBAL &#13;
	&#13;
	gsUsuario is ANSI string&#13;
	gsNome    is ANSI string&#13;
	gsSenha   is ANSI string&#13;
	&#13;
	gsGrupo    is string&#13;
	gsItem     is string&#13;
	gsSubitem  is string&#13;
	&#13;
	gsPrograma  is ANSI string&#13;
	gnSAtalho   is int &#13;
	&#13;
	gnQtConexoes    is int&#13;
	gsBancodeDados  is string&#13;
	gsServidor      is string&#13;
	&#13;
	Wsge_Empresa    is int       //  sera passado para todos os programas o codigo da Empresa&#13;
	Wsge_NomeEmpresa is string   //  sera passado para todos os programas o Nome   da Empresa&#13;
	&#13;
&#13;
EXTERN "KeyConst.WL"             // para controlar as teclas de funcoes&#13;
EXTERN "WinConst.WL"&#13;
&#13;
&#13;
HDescribeConnection("Dec","sa","teste","DEC-PC","teste",hNativeAccessSQLServer,hOReadWrite,"Server Port = 1433")&#13;
&#13;
&#13;
// Opening the connxection&#13;
IF HOpenConnection("Dec")  = False THEN&#13;
	Error("The connection to the data source " +  " failed." + CR + "Error code: " + SQL.Error + CR + SQL.MesError)&#13;
	RETURN &#13;
END&#13;
&#13;
&#13;
sSql      is ANSI string&#13;
bExecuta  is boolean&#13;
&#13;
////     Pega Nome do Servidor e Nome do Banco de Dados&#13;
MyProcedure is Data Source&#13;
&#13;
MyProcedure.Database    =  " " &#13;
MyProcedure.servername  = " " &#13;
IF not HExecuteSQLQuery(MyProcedure, "Dec", hQueryWithoutCorrection, "Dec_Getserver @Database  out ,@servername out" ) THEN &#13;
	//IF NOT HExecuteSQLQuery(MyProcedure, "AcessoNativoSQL", hQueryWithoutCorrection, "Dec_Getserver @Database  out ,@servername out" ) THEN &#13;
	Error(HErrorInfo())&#13;
	Close()&#13;
ELSE    &#13;
	gsServidor     = MyProcedure.servername   &#13;
	gsBancodeDados = MyProcedure.Database  &#13;
END&#13;
HCancelDeclaration(MyProcedure)  //   libera da memoria&#13;
 &#13;
Info(gsServidor,gsBancodeDados)</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67440-generate-project-using-sql-server-native-driver-not/read.awp</link><title>Generate Project using SQL Server Native Driver Do not Open a connection, but in Debug works Fine</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>clages1</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67440-generate-project-using-sql-server-native-driver-not-67447/read.awp</comments><pubDate>29 Nov 2019 12:31:09 Z</pubDate><description>Hi i found by my self  and friends help how to solve it&#13;
we must create a install of project, so this works fine&#13;
only using But…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67440-generate-project-using-sql-server-native-driver-not-67447/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67440-generate-project-using-sql-server-native-driver-not-67447/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/67440-generate-project-using-sql-server-native-driver-not/read.awp">Generate Project using SQL Server Native Driver Do not Open a connection, but in Debug works Fine</source><title>Re: Generate Project using SQL Server Native Driver Do not Open a connection, but in Debug works Fine</title></item></channel></rss>
