Difference between revisions of "Error Messages/40858"
AManandhar (talk | contribs) (→Cause) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category: Error messages]] | |
− | + | == Error message examples == | |
− | + | <pre style="background:white; border:white; margin-left: 1em; font-style:italic"> | |
+ | First parameter to DbTable must be defined with a DbQuery or DbWrite function. | ||
− | + | First parameter to DbLabels must be defined with a DbQuery or DbWrite function. | |
+ | </pre> | ||
− | The first parameter passed to the function mentioned in the error message must be a | + | == Cause == |
+ | |||
+ | The first parameter passed to the function mentioned in the error message must be a «dbIndex», variable in your Analytica model defined with [[DbQuery|DbQuery()]] or [[DbWrite|Dbwrite()]] function. | ||
The following code shows an example of using the [[DbLabels]] with another object defined with [[DbQuery]]: | The following code shows an example of using the [[DbLabels]] with another object defined with [[DbQuery]]: | ||
− | Definition of | + | Definition of <code>DBRows</code>: |
− | <code>DbQuery("DSN= | + | :<code>DBRows := DbQuery("DSN = Sample Database", "Select * From Customer")</code> |
− | |||
− | Definition of | + | Definition of <code>DBColumnNames</code>: |
− | <code>DbLabels(DBRows); | + | :<code>DBColumnNames := DbLabels(DBRows);</code> |
− | </code> | ||
− | = Remedies = | + | == Remedies == |
+ | Correct the first parameter to the function to be «dbIndex» index defined by either the [[DbQuery|DbQuery()]] or the [[DbWrite|Dbwrite()]] function. | ||
− | + | ==See Also== | |
+ | * [[DbTable]] | ||
+ | * [[DbLabels]] | ||
+ | * [[DbQuery]] | ||
+ | * [[DbWrite]] |
Latest revision as of 22:12, 8 March 2016
Error message examples
First parameter to DbTable must be defined with a DbQuery or DbWrite function. First parameter to DbLabels must be defined with a DbQuery or DbWrite function.
Cause
The first parameter passed to the function mentioned in the error message must be a «dbIndex», variable in your Analytica model defined with DbQuery() or Dbwrite() function.
The following code shows an example of using the DbLabels with another object defined with DbQuery:
Definition of DBRows
:
DBRows := DbQuery("DSN = Sample Database", "Select * From Customer")
Definition of DBColumnNames
:
DBColumnNames := DbLabels(DBRows);
Remedies
Correct the first parameter to the function to be «dbIndex» index defined by either the DbQuery() or the Dbwrite() function.
See Also
Comments
Enable comment auto-refresher