Skip to main content
Skip table of contents

f$SQLGetCols


f$SQLGetCols

This function returns the result columns of any SQL command in a comma-separated list. Optionally, a list with the following information can be determined in an indexed parameter group.

-Name : Name of column

-ColTyp : Data type of the column as a number:

1

SQL_CHAR

2

SQL_NUMERIC

3

SQL_DECIMAL

4

SQL_INTEGER

5

SQL_SMALLINT

6

SQL_FLOAT

7

SQL_REAL

8

SQL_DOUBLE

9

SQL_DATETIME

10

SQL_TIME

11

SQL_TIMESTAMP

12

SQL_VARCHAR

-1

SQL_LONGVARCHAR

-2

SQL_BINARY

-3

SQL_VARBINARY

-4

SQL_LONGVARBINARY

-5

SQL_BIGINT

-6

SQL_TINYINT

-7

SQL_BIT

-11

SQL_GUID


-Typ : Recommended ePOS data type of the column as a number

o1 – string

o2 – integer

o3 - float

The parameter group is enlarged as required.

Syntax:

Status = f$SQLSpaltenliste( Kanal , SQL , 'NameListe' [, 'NamePG'] )

 

Argument

Type

Meaning

 

Kanal

Integer

Channel number for the SQL connection

 

SQL

String

The SQL Command

 

NameListe

String

Name of the parameter on which the comma-separated list of column names is written.

 

NamePG

String

Name of the single indexed parameter group to which the column names and their data types are written. This parameter group is optional. The parameter group should contain the following columns:

Name of data type String

ColType of data type Integer

Typ of data type Integer

Result:

Integer

Error status:

0 :command was resolved correctly

-9999: the SQL command was not successful. In this case, the error status and error description can be calculated using: f$SQLError.

Sample:

P$TDV:SMPAPI:Check_ODBC()

SQL = 'SELECT * FROM TP_Zuverlass'

Status = f$SQLSpaltenliste( SMP_NG.ODBC_KANAL , SQL , 'Spaltenliste')

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.