FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
[WD22} SQLCol() removing trailing zeros
[WD22} SQLCol() removing trailing zeros
Débuté par Robert, 28 aoû. 2018 15:19 - 3 réponses
Connectez-vous…
Robert
#1
Membre enregistré
105 messages
Posté le 28 août 2018 - 15:19
Is there a way to get SQLCol() to not remove trailing zeroes from a result field?
I have a query against an SQL database connected via SQLConnect(sServer, sUser, sPassword, sDatabase, "OLEDB", hOledbSQLServer) with one column specifically formatted with 5 decimal places. But SQLCol() is getting rid of all of the zeroes at the end, so when the result is for example 27.25000 it's cutting it off as 27.25.
Message modifié, 28 août 2018 - 15:20
Signaler
0
0
Fabrice Harari
#2
Posté le 28 août 2018 - 23:55
Hi Robert,
it looks like your column is of numerical type... if that is correct,
then the 5 decimal thingy is ONLY at the DISPLAY level... the value is
27.25; no matter what DB is used
Now, if you want to STORE 27.25000 in the DB, it has to be in a
STRING,and in that case, you will get the string with the zero on the
windev side.
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.
More information on
http://www.fabriceharari.com
On 8/28/2018 7:19 AM, Robert wrote:
Is there a way to get SQLCol() to not remove trailing zeroes from a
result field?
I have a query against an SQL database connected via SQLConnect(sServer,
sUser, sPassword, sDatabase, "OLEDB", hOledbSQLServer) with one column
specifically formatted with 5 decimal places. But SQLCol() is getting
rid of all of the zeroes at the end, so when the result is for example
27.25000 it's cutting it off as 27.25.
Signaler
0
0
meikl
#3
Membre enregistré
118 messages
Posté le 29 août 2018 - 09:30
my guess
as it is returned as a native number you have to adjust the imputmask-property for visualizing
meikl
Signaler
0
0
Robert
#4
Membre enregistré
105 messages
Posté le 30 août 2018 - 21:14
Thanks for the tips!
Signaler
0
0
→ Revenir à WINDEV 2024
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