How to Use ODBC Functions in a Remote View (147731)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q147731 SUMMARY
When creating a remote view, you must ensure that the selection criteria
are valid functions that will be understood by the server. For example,
with SQL Server, there are some ODBC and Visual FoxPro functions that do
not exist in the SQL Server syntax.
To use an ODBC function, you can declare it as a scalar function to be
passed to the SQL Server thus:
?SQLEXEC('SELECT {fn MONTH(date)} FROM sales WHERE {fn MONTH(date)}=9')
This SQL statement will return only the month value of the date field where
the month is September. A more realistic SQL statement would be:
?SQLEXEC('SELECT * FROM sales WHERE {fn MONTH(date)}=?cMonth')
Modification Type: | Major | Last Reviewed: | 8/20/1999 |
---|
Keywords: | KB147731 |
---|
|