Applies To: |
|
Summary: |
How do I use the AS (Alias) keyword in the Cicode SQLGetField() statement? |
Solution: |
The Citect SQLGetField() function does not
support any alias names as defined by the AS command. However if a
column has no name, f.e. if the contents were calculated, or if a
column has an alias name, then I can use the name "fieldX" to
identify that column. X is then replaced with the column number.
Example (using the Northwind demo database in SQL Server 7): FUNCTION int hdev, i; hdev = sqlconnect("dsn=testsql")
sqlexec(hdev,"select orderid, productid,
for i = 1 to 5 do
sqlend(hdev); In this example the third column in my result record set (as returned by the SqlExec() statement), is a calculated column with an alias name. So I will have to use "field3" to get the contents of a field in that column with the SQLGetField() function. |
Keywords: |
Related Links
Attachments