Difference between revisions of "DbQuery"

Line 6: Line 6:
 
== New to 4.0 ==
 
== New to 4.0 ==
  
In Analytica 4.0 (but not in Analytica 3.x and earlier), a local index can hold the record set.  This means you can create a user-defined function that bundles several database query steps.  For example:
+
In Analytica 4.0 (but not earlier releases), a local index can hold the record set.  This means you can create a user-defined function that bundles several database query steps.  For example:
  
   Function DbFullTable( connectionStr,sql : text )
+
   Function DbFullTable(connectionStr, sql: text)
 
   Definition:
 
   Definition:
     Index Row := DbQuery(connectionStr,sql);
+
     Index Rows := DbQuery(connectionStr, sql);
     Index Column := DbLabels(Row);
+
     Index Cols := DbLabels(Rows);
     DbTable(Row,Column)
+
     DbTable(Rows, Cols)
  
This user-defined function returns the full relational table in a single call, using local indexes, Rows and Columns.
+
This user-defined function returns the full relational table in a single call, using local indexes, Rows and Cols.

Revision as of 04:41, 8 March 2007


Queries an ODBC database. {stub}

New to 4.0

In Analytica 4.0 (but not earlier releases), a local index can hold the record set. This means you can create a user-defined function that bundles several database query steps. For example:

 Function DbFullTable(connectionStr, sql: text)
 Definition:
    Index Rows := DbQuery(connectionStr, sql);
    Index Cols := DbLabels(Rows);
    DbTable(Rows, Cols)

This user-defined function returns the full relational table in a single call, using local indexes, Rows and Cols.

Comments


You are not allowed to post comments.