Hosted by uCoz
Имена и тип колонок из таблицы в DataStore
 
   int li, lj
   string ls, ls_sql, ls_table, ls_syntax, 
   string ls_cols[ ] // Will contain the column names
   string ls_datatype[ ] // Will contain the column data types
   datastore lds

   ls_table = "tablename" // eg for table with name "tablename"
   ls_sql = "SELECT * FROM " + ls_table
   lds = CREATE datastore
   ls_syntax = SQLCA.SyntaxFromSQL(ls_sql, "", ls_errors)

   li = lds.CREATE(ls_syntax, ls_errors)
   ls = lds.Object.DataWindow.Column.Count
   lj = integer(ls)
   FOR li = 1 TO lj
       ls_describe = "#" + string(li) + ".dbName"
       ls_col[li] = lds.Describe(ls_describe)
       ls_describe = "#" + string(li) + ".ColType"
       ls_datatype[li] = lds.Describe(ls_describe)
   NEXT

   DESTROY lds