PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 28 → Cómo saber el nombre de las columnas de un data source
Cómo saber el nombre de las columnas de un data source
Started by Alejandro Gutiérrez, Oct., 17 2020 5:47 PM - 5 replies
Posted on October, 17 2020 - 5:47 PM
Saludos cordiales

XCLIENTES is data source

HExecuteSQLQuery(XCLIENTES, myConn2, hQueryWithoutCorrection,"SELECT top 100 * FROM CLIENTES")

HReadFirst(XCLIENTES)

XCLIENTES.CLI_NOMBRE // Es el contenido de CLI_NOMBRE

Hay algo como ...

nombredecolumna(xclientes.1) // devuelve cli_codigo
nombredecolumna(xclientes.2) // devuelve cli_nombre
nombredecolumna(xclientes.3) // devuelve cli_ruc

?

Gracias por su ayuda.


atte.

Alejandro
Registered member
1,143 messages
Popularité : +50 (142 votes)
Posted on October, 21 2020 - 3:43 PM
Saludos,

Como asi : XCLIENTES.TOP ?

o con ALIAS :

HExecuteSQLQuery(XCLIENTES, myConn2, hQueryWithoutCorrection,"SELECT top As ELTOP 100 * FROM CLIENTES")

....
XCLIENTES.ELTOP

si?

--
Thierry TILLIER
Développeur Windev-Webdev
Formation Windev : https://coursdinfo.teachable.com/
Formation bureautique : https://coursdinfo.net
Registered member
1,143 messages
Popularité : +50 (142 votes)
Posted on October, 21 2020 - 3:45 PM
perdoname, no es corecto

--
Thierry TILLIER
Développeur Windev-Webdev
Formation Windev : https://coursdinfo.teachable.com/
Formation bureautique : https://coursdinfo.net
Registered member
1,143 messages
Popularité : +50 (142 votes)
Posted on October, 21 2020 - 4:03 PM
No puedo hacer en SQL server pero
no puedes cambiar * en los nombres que necessitan ?

--
Thierry TILLIER
Développeur Windev-Webdev
Formation Windev : https://coursdinfo.teachable.com/
Formation bureautique : https://coursdinfo.net
Registered member
794 messages
Popularité : +40 (42 votes)
Posted on October, 21 2020 - 7:23 PM
Hola, mira aqui https://ayuda.windev.es/es-ES/…

Tienes la opcion SQL.TitleCol [ n] para conocer el nombre de los campos segun su numero.

Rubén
Posted on October, 22 2020 - 10:10 PM
Saludos, gracias por su ayuda.

AsÍ funcionó:

SQLExec("select * from clientes",xclientes)

SQLInfo(xclientes)

Info(SQL.TitleCol [ 1]) // muesta cli_codigo
Info(SQL.TitleCol [ 2]) // muestra cli_nombre