PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Houvreconnexion ne fonctionne pas en déploiement
Houvreconnexion ne fonctionne pas en déploiement
Débuté par ATCHE / Green Valley, 06 déc. 2017 12:00 - 7 réponses
Membre enregistré
10 messages
Posté le 06 décembre 2017 - 12:00
Bonjour à tous,

J'ai mis en place un site dynamique webdev avec bien sûr une base de données HFSQL.
Dans mon site, j'attaque certaines tables MySQL afin d'y ajouter certaines données. J'utilise donc une description de connexion MySQL et j'ouvre la connexion avec houvreconnexion.
Tout fonctionne sur ma machine (unité de développement), mais lorsque je passe en production sur le serveur où j'ai déployé mon application et la même base de données MySQL, ça ne marche pas.
La fonctionne houvreconnexion ne semble pas fonctionné puisqu'elle me ramène mon message de contrôle d'erreur, et les tables MySQL ne sont pas renseignées.

Voici le code :

PROCEDURE RemplirTclient(numcompte,idlicen)

clientcompte est une Structure
idcompte est un numérique
numerocpt est une chaîne
RaisonS est une chaîne
emetteur est une chaîne
adressep est une chaîne
logo est une Image
signature est une Image
localisation est une chaîne
geolocation est une chaîne
telephone est une chaîne
motif est une chaîne
idclient est un numérique
datecreation est une Date
heurecreation est une Heure
saisipar est une chaîne
email est une chaîne
FIN

clientlicence est une Structure
idlicencekey est un numérique
numcpte est une chaîne
numerolicence est une chaîne
produitL est une chaîne
adressekey est une chaîne
activation est un entier
motif est une chaîne
idclientyubi est une chaîne
secretkeyyubi est une chaîne
datecreation est une Date
heurecreation est une Heure
saisipar est une chaîne
FIN

stCptremplit est un clientcompte
stLicencerempli est un clientlicence

nResulouvre est un entier
sInfosacces est une chaîne
sNomserver est une chaîne
sNamebd est une chaîne
sErreurtrouve est une chaîne
//resultenvoie est un buffer
HLitRecherche(LICENCEKEY,numerolicence,idlicen)
SI H.Trouve ALORS
stLicencerempli.activation = 1
stLicencerempli.adressekey = LICENCEKEY.adressekey
stLicencerempli.datecreation = LICENCEKEY.datecreation
stLicencerempli.heurecreation = LICENCEKEY.heurecreation
stLicencerempli.numcpte = LICENCEKEY.Numerocpt
stLicencerempli.idlicencekey = LICENCEKEY.IDLICENCEKEY
stLicencerempli.motif = LICENCEKEY.motif
stLicencerempli.numerolicence = LICENCEKEY.numerolicence
stLicencerempli.produitL = LICENCEKEY.produitL
stLicencerempli.saisipar = LICENCEKEY.saisipar
stLicencerempli.idclientyubi = LICENCEKEY.clientidyubi
stLicencerempli.secretkeyyubi = LICENCEKEY.secretkeyyubico
SINON
PageAfficheDialogue(PAGE_info2,"Licence non trouvé !")
FIN

HLitRecherche(COMPTE,numerocpt,numcompte)
SI H.Trouve ALORS
FichierVersMémoire(stCptremplit,COMPTE)
//verificaton existance fichier ini (connexion à la bd)
SI fFichierExiste(MonRépertoire+"\AdresseServeurMSQL.ini")=Faux ALORS
nResulouvre = fOuvre(MonRépertoire+"\AdresseServeurMSQL.ini",foCréationSiInexistant)
SINON
nResulouvre = fOuvre(MonRépertoire+"\AdresseServeurMSQL.ini",foLecture)
sInfosacces = fLitLigne(nResulouvre)
sNomserver = ExtraitChaîne(sInfosacces,1,";")
sNamebd = ExtraitChaîne(sInfosacces,2,";")
Info(sNomserver,sNamebd)
connexionmysql1 est une Connexion
// Description de la connexion
connexionmysql1..Utilisateur = "root"
connexionmysql1..MotDePasse = "Mybillbox123"
connexionmysql1..Serveur = sNomserver //+":3306"
connexionmysql1..BaseDeDonnées = sNamebd
connexionmysql1..Provider = hAccèsNatifMySQL
connexionmysql1..Accès = hOLectureEcriture
//HyperFileCS..InfosEtendues = crypteRC516

HOuvreConnexion(connexionmysql1)
SI ErreurDétectée ALORS
sErreurtrouve = ErreurInfo(errComplet)
PageAfficheDialogue(PAGE_info2,"Impossible d'ouvrir la connexion !")
RENVOYER(sErreurtrouve)
SINON
//remplir compte_client de la base MySQL
HChangeConnexion(compte_client,connexionmysql1)
compte_client.adressep = stCptremplit.adressep
compte_client.datecreation = stCptremplit.datecreation
compte_client.emetteur = stCptremplit.emetteur
compte_client.heurecreation = stCptremplit.heurecreation
compte_client.id_client = stCptremplit.idclient
// compte_client.IDCOMPTE = stCptremplit.idcompte
compte_client.geo_location_code = stCptremplit.geolocation
compte_client.localisation = stCptremplit.localisation
compte_client.logo = stCptremplit.logo
compte_client.numerocpt = stCptremplit.numerocpt
compte_client.raisonS = stCptremplit.RaisonS
compte_client.saisipar = stCptremplit.saisipar
compte_client.signature = stCptremplit.signature
compte_client.telephone = stCptremplit.telephone
compte_client.email = stCptremplit.email
HAjoute(compte_client)
//Remplir la table licencekey de la base MySQL
HChangeConnexion(licence_key,connexionmysql1)
licence_key.activation = stLicencerempli.activation
licence_key.adresseKey = stLicencerempli.adressekey
licence_key.date_creation = stLicencerempli.datecreation
licence_key.heure_creation = stLicencerempli.heurecreation
licence_key.numerocpte = stLicencerempli.numcpte
// licence_key.ID = stLicencerempli.idlicencekey
licence_key.motifs = stLicencerempli.motif
licence_key.numero_licence = stLicencerempli.numerolicence
licence_key.produitL = stLicencerempli.produitL
licence_key.saisi_par = stLicencerempli.saisipar
licence_key.client_id = stLicencerempli.idclientyubi
licence_key.secret_key = stLicencerempli.secretkeyyubi
HAjoute(licence_key)
HFermeConnexion(connexionmysql1)
RENVOYER("OK")
FIN
FIN
SINON
PageAfficheDialogue(PAGE_info2,"Not found !")
RENVOYER("Not found")
FIN

Merci de votre aide.

--
koloabib
Posté le 06 décembre 2017 - 14:20
bonjour
L'accès natif mysql est-il installé sur le serveur ?

Le 06/12/2017, ATCHE / Green Valley a supposé :
Bonjour à tous,

J'ai mis en place un site dynamique webdev avec bien sûr une base de données
HFSQL.
Dans mon site, j'attaque certaines tables MySQL afin d'y ajouter certaines
données. J'utilise donc une description de connexion MySQL et j'ouvre la
connexion avec houvreconnexion.
Tout fonctionne sur ma machine (unité de développement), mais lorsque je
passe en production sur le serveur où j'ai déployé mon application et la même
base de données MySQL, ça ne marche pas.
La fonctionne houvreconnexion ne semble pas fonctionné puisqu'elle me ramène
mon message de contrôle d'erreur, et les tables MySQL ne sont pas
renseignées.

Voici le code :

PROCEDURE RemplirTclient(numcompte,idlicen)

clientcompte est une Structure
idcompte est un numérique
numerocpt est une chaîne
RaisonS est une chaîne
emetteur est une chaîne
adressep est une chaîne
logo est une Image
signature est une Image
localisation est une chaîne
geolocation est une chaîne
telephone est une chaîne
motif est une chaîne
idclient est un numérique
datecreation est une Date
heurecreation est une Heure
saisipar est une chaîne
email est une chaîne
FIN

clientlicence est une Structure
idlicencekey est un numérique
numcpte est une chaîne
numerolicence est une chaîne
produitL est une chaîne
adressekey est une chaîne
activation est un entier
motif est une chaîne
idclientyubi est une chaîne
secretkeyyubi est une chaîne
datecreation est une Date
heurecreation est une Heure
saisipar est une chaîne
FIN

stCptremplit est un clientcompte
stLicencerempli est un clientlicence

nResulouvre est un entier
sInfosacces est une chaîne
sNomserver est une chaîne
sNamebd est une chaîne
sErreurtrouve est une chaîne
//resultenvoie est un buffer
HLitRecherche(LICENCEKEY,numerolicence,idlicen)
SI H.Trouve ALORS
stLicencerempli.activation = 1
stLicencerempli.adressekey = LICENCEKEY.adressekey
stLicencerempli.datecreation = LICENCEKEY.datecreation
stLicencerempli.heurecreation = LICENCEKEY.heurecreation
stLicencerempli.numcpte = LICENCEKEY.Numerocpt
stLicencerempli.idlicencekey = LICENCEKEY.IDLICENCEKEY
stLicencerempli.motif = LICENCEKEY.motif
stLicencerempli.numerolicence = LICENCEKEY.numerolicence
stLicencerempli.produitL = LICENCEKEY.produitL
stLicencerempli.saisipar = LICENCEKEY.saisipar
stLicencerempli.idclientyubi = LICENCEKEY.clientidyubi
stLicencerempli.secretkeyyubi = LICENCEKEY.secretkeyyubico
SINON
PageAfficheDialogue(PAGE_info2,"Licence non trouvé !")
FIN

HLitRecherche(COMPTE,numerocpt,numcompte)
SI H.Trouve ALORS
FichierVersMémoire(stCptremplit,COMPTE)
//verificaton existance fichier ini (connexion à la bd)
SI fFichierExiste(MonRépertoire+"\AdresseServeurMSQL.ini")=Faux ALORS
nResulouvre =
fOuvre(MonRépertoire+"\AdresseServeurMSQL.ini",foCréationSiInexistant)
SINON
nResulouvre = fOuvre(MonRépertoire+"\AdresseServeurMSQL.ini",foLecture)
sInfosacces = fLitLigne(nResulouvre)
sNomserver = ExtraitChaîne(sInfosacces,1,";")
sNamebd = ExtraitChaîne(sInfosacces,2,";")
Info(sNomserver,sNamebd)
connexionmysql1 est une Connexion
// Description de la connexion
connexionmysql1..Utilisateur = "root"
connexionmysql1..MotDePasse = "Mybillbox123"
connexionmysql1..Serveur = sNomserver //+":3306"
connexionmysql1..BaseDeDonnées = sNamebd
connexionmysql1..Provider = hAccèsNatifMySQL
connexionmysql1..Accès = hOLectureEcriture
//HyperFileCS..InfosEtendues = crypteRC516

HOuvreConnexion(connexionmysql1)
SI ErreurDétectée ALORS
sErreurtrouve = ErreurInfo(errComplet)
PageAfficheDialogue(PAGE_info2,"Impossible d'ouvrir la connexion !")
RENVOYER(sErreurtrouve)
SINON
//remplir compte_client de la base MySQL
HChangeConnexion(compte_client,connexionmysql1)
compte_client.adressep = stCptremplit.adressep
compte_client.datecreation = stCptremplit.datecreation
compte_client.emetteur = stCptremplit.emetteur
compte_client.heurecreation = stCptremplit.heurecreation
compte_client.id_client = stCptremplit.idclient
// compte_client.IDCOMPTE = stCptremplit.idcompte
compte_client.geo_location_code = stCptremplit.geolocation
compte_client.localisation = stCptremplit.localisation
compte_client.logo = stCptremplit.logo
compte_client.numerocpt = stCptremplit.numerocpt
compte_client.raisonS = stCptremplit.RaisonS
compte_client.saisipar = stCptremplit.saisipar
compte_client.signature = stCptremplit.signature
compte_client.telephone = stCptremplit.telephone
compte_client.email = stCptremplit.email
HAjoute(compte_client)
//Remplir la table licencekey de la base MySQL
HChangeConnexion(licence_key,connexionmysql1)
licence_key.activation = stLicencerempli.activation
licence_key.adresseKey = stLicencerempli.adressekey
licence_key.date_creation = stLicencerempli.datecreation
licence_key.heure_creation = stLicencerempli.heurecreation
licence_key.numerocpte = stLicencerempli.numcpte
// licence_key.ID = stLicencerempli.idlicencekey
licence_key.motifs = stLicencerempli.motif
licence_key.numero_licence = stLicencerempli.numerolicence
licence_key.produitL = stLicencerempli.produitL
licence_key.saisi_par = stLicencerempli.saisipar
licence_key.client_id = stLicencerempli.idclientyubi
licence_key.secret_key = stLicencerempli.secretkeyyubi
HAjoute(licence_key)
HFermeConnexion(connexionmysql1)
RENVOYER("OK")
FIN
FIN
SINON
PageAfficheDialogue(PAGE_info2,"Not found !")
RENVOYER("Not found")
FIN

Merci de votre aide.


---
Cet email a fait l'objet d'une analyse antivirus par AVG.
http://www.avg.com
Membre enregistré
10 messages
Posté le 06 décembre 2017 - 14:40
Bonjour Roumegou,

J'ai téléchargé et installé l'accès natifs sur le serveur.

--
koloabib
Membre enregistré
10 messages
Posté le 06 décembre 2017 - 14:55
Malgré tout le problème persiste... :(

--
koloabib
Membre enregistré
945 messages
Popularité : +53 (63 votes)
Posté le 06 décembre 2017 - 16:26
Bonjour,

Quel est le message d'erreur exactement ?

jordan
Membre enregistré
10 messages
Posté le 06 décembre 2017 - 16:50
J'ai inséré un instruction pour avoir plus de détail sur l'erreur, et voilà ci-dessous l'image de l'erreur:




--
koloabib
Posté le 06 décembre 2017 - 18:04
Le 06/12/2017 à 15:50, ATCHE / Green Valley a écrit :
J'ai inséré un instruction pour avoir plus de détail sur l'erreur, et
voilà ci-dessous l'image de l'erreur:





--
koloabib

salut.

il doit manquer la dll mysql dans le rep de ton projet...
Membre enregistré
10 messages
Posté le 06 décembre 2017 - 18:18
Mon problème a été résolu.

J'ai récupéré le fichier libmysql.dll d'une application que j'ai fait en windev et installé sur le même serveur, pour la copier dans le répertoire \programfile(x82)\PCSOFT\WEBDEV\22\ et ça marche ! :merci:

Merci à tous :)

--
koloabib