PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Converting WebDev24 app from HF Classic to HF Client/Server
Converting WebDev24 app from HF Classic to HF Client/Server
Débuté par Ericus, 14 avr. 2025 10:26 - 2 réponses
Posté le 14 avril 2025 - 10:26
Good day

The subject says it all. I managed to install and import the HF Classic data and all of that.

But my issue is my application won't run a Query and if so it creates a new database within the existing database folder. I have no idea where I am going wrong.

Please help me out here.

Regards
Membre enregistré
187 messages
Posté le 14 avril 2025 - 14:21
Good morning Mister

I see your request. You want to connect a C/S database. You need to replace the database connection code with HOuvreConnexion().

Here's some code to help you.

cnConnection is a Connexion // EDD (11/24): Connection Description
cnConnexion..Utilisateur = "Utilisateur"
cnConnexion..MotDePasse = "Mot de passe"
cnConnexion..Serveur = "Adresse ip | Nom serveur"
cnConnexion..BaseDeDonnées = "Base de données"
cnConnexion..Provider = hAccèsHFClientServeur
cnConnexion..Accès = hOLectureEcriture
cnConnexion..InfosEtendues = "Infos étendues"
cnConnexion..OptionsCurseur = hCurseurClient
IF HOuvreConnexion(cnConnexion) = False THEN // EDD (11/24) : Opening the connection and a validation check
Info(ErreurInfo(errComplet))
EndProgram()
ELSE
info("The relationship to the C/S database is successful.")
END

NB: Be careful, the C/S connection is often coded using the HOpenConnection() syntax, then you need to implement the cnConnection variable in the HExecuteSQLQuery() code.
NB: You need to change the entire C/S database relationship because native access is required for this.

Best regard
Mr.RATSIMANDRESY
Niry Aina Eddy
Membre enregistré
2 messages
Posté le 15 avril 2025 - 09:14
It sounds like you're dealing with a bit of a tricky situation. Based on what you've described, the issue could be related to the database configuration after migrating from HF Classic to HF Client/Server. I’d suggest first checking if the connection string or database path is properly set in the new environment. Sometimes, after a conversion, the app might point to a default location, which could explain why it's creating a new database in the folder. Another thing to consider is whether the application has the correct permissions to access the existing database; if it doesn’t, that could also prevent queries from running correctly.

Also, it's worth reviewing how queries are executed in HF Client/Server mode compared to HF Classic since there might be slight differences in how they’re handled. Lastly, enabling logging or debugging could give you more insight into what's going wrong when the query is executed.