FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV (précédentes versions)
→
Calling once - running twice, even four times
Calling once - running twice, even four times
Débuté par Avond, 07 sep. 2012 16:36 - Aucune réponse
Connectez-vous…
Avond
#1
Posté le 07 septembre 2012 - 16:36
Hi, all
Can somebody help me with calling stored procedure from Windev
General info: USed version WinDev - 12
MS SQL database 2008
Problem: In database I have Stored Procedure which increment some field by 1 and returns the value of the field. I am calling the stored procedure once from over environment, it does what should do: value of the field incremented by 1, and returns proper value.
From WinDev program: I call stored procedure once by HExecuteSQLQuery it increments the field by 2. Then I call HReadFirst - it increments again the value by 2.
Here is piece of the code:
locResult is int = -1
locStore is Data Source
//here initial value of AutoValue is 4, for example
IF HExecuteSQLQuery(locStore,"MegaSQLConnection",hQueryWithoutCorrection , "CP_Get_AutoValue @NAME=" + pFileName + "") THEN
//Here the value changed to 6
HReadFirst(locStore)
//here value changed to 8
locResult = locStore.AutoValue
ELSE
locResult = -1
END
First queestion: Is it a bug in WinDev. How prevent calling Stored procedure twice?
Second: Is this the same in following versions of WInDev?
Very appriciated your answers
Signaler
0
0
→ Revenir à WINDEV (précédentes versions)
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte