PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → Problem with deply database
Problem with deply database
Iniciado por Mimmo Ghiara, nov., 20 2019 6:54 PM - 3 respostas
Publicado em novembro, 20 2019 - 6:54 PM
Hello everybody,
with great effort I managed to deploy my application but I have a problem with the HFSQL database server.
On the deployment server the data server has a different name than the one on the web server. When I launch the application it gives me an error because it looks for the server with the name of the development computer.
I thought the installation package would make this change
What can I do? do I have to change my program on the development computer and change all the calls?
Give me a suggestion
Thanks
Mimmo
Publicado em junho, 11 2020 - 4:58 PM
Hi Mimmo

I am currently also running into this issue (Not with HFSQL database server, but with SQLserver).
I developed using a local server but now I have to deploy the code on an other server at an other company.
I do have teamviewer access to run the deployment, but get an error that it tries to find the name of our local database server. How/where can I change the connection name?

Henk
Membro registado
5 mensagems
Publicado em junho, 11 2020 - 5:08 PM
Hi Mimmo,

Did you ever get this problem solved? I'm currently also running into this issue (Not with HFSQL server but with SQLserver).
I have a local SQLserver database server that I use for developing my webdev application. And tested deployment on a local IIS server. So far so good. But now I have to install the APP at a remote location (with teamviewer access). I created at the remote location an IIS server, an SQL server (with exactly the same database settings as we used during testing) But when I try to install my deployment package, it fails because it is searching for the database connection that we using in our internal network. I even deleted the connection settings in my development system and replaced it with a new connection configuration for the new location and atached the "old" analysis to it. However when I try to deploy this, on the new location I again get an error it can not find the name of our local SQL server.

Henk
Membro registado
5 mensagems
Publicado em junho, 29 2020 - 2:58 PM
I found the solution to this problem, with a little help of Fabrice Harari. The solution is you should remove the connection definition from the analysis. I added the connection again in code at the project top level:
MyConnection is Connection
MyConnection..User = "Database user"
MyConnection..Password = "Database Password"
MyConnection..Provider = hOledbSQLServer // Depends on your environment
MyConnection..Access = hOReadWrite // Or what you need

MyConnection..Server = "Your Database server"
MyConnection..Database = "Your Database"

IF HOpenConnection(MyConnection) == False THEN
Info(HErrorInfo(hErrMessage))
END
HChangeConnection("*", MyConnection)


You can make the Server/Database configuration more smart by providing the values for your development and your production environment with some kind of selection mechanism.

Henk