Article ID: 186103 - View products that this article applies to.
This article was previously published under Q186103
This article has been archived. It is offered "as is" and will no longer be updated.
The sample code below demonstrates how to use the Nextval function of an Oracle database from Visual FoxPro. The Nextval function retrieves the next available number from a sequence.
Oracle Sequence is similar to Identity Columns in Microsoft SQL Server version 6.0, which contains system-generated sequential values that uniquely identify each row within a table.
SQL Passthrough sample code
Remote viewThe Remote View designer parses 'PersonSN.nextval' as a field named "nextval" in a table named "PersonSN". Since a table named "PersonSN" does not exist, the following error occurs at run-time:
In order to retrieve the sequence from Oracle, you must call an Oracle User Defined Function (UDF) before appending a record.
Alias not found.
Oracle Server -------------
Visual FoxPro -------------
Article ID: 186103 - Last Review: February 23, 2014 - Revision: 3.1