FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WEBDEV 2024
→
Finding the last Job Number and Adding 1
Finding the last Job Number and Adding 1
Iniciado por James, 09,may. 2012 14:28 - 1 respuesta
Conéctese…
James
#1
Miembro registrado
11 mensajes
Publicado el 09,mayo 2012 - 14:28
HExecuteQuery & HExecuteSQLQuery both return a true or false.
How do I find the last job number used and then add one ++. "SELECT MAX(ProjectNumber) FROM Project" returns the correct result from the query editor but I don't know how to translate that to a variable so I can add one and then update the record with a new job number.
Thanks in advance.
Informar
0
0
James
#2
Miembro registrado
11 mensajes
Publicado el 09,mayo 2012 - 15:09
Every time I post I seem to work these out, despite looking over it for a while. I'll post my solution just in case some one stumbles upon it and offers a better solution.
HExecuteQuery(QRY_GetLastJobNumber)
IF ErrorOccurred THEN
Error("Error occurred getting the job number" + CR + HErrorInfo())
RETURN
END
EDT_ProjectNumber = QRY_GetLastJobNumber.LastProjectNumber+1
Informar
0
0
→ Volver a WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto