>We are creating views against a SQL Server and have encountered new thing (go figure). In the SQL server, there is a datetime field and we tried to setup a VFP view to pull just the date portion in the view:
>
>ttoc(subs(record_datetime,1,10)) as JustDate
>
>When we attempt to run the view, we get an ODBC error saying function ttoc not found, if we try just substring() we get a conversion error, but if we do left(record_datetime,1,10) it works returning a character field.
>
>I just thought there may be a posting somewhere that list valid command you can use in a remote view.
>
>Thanks for any help.
>Kirk
A remote view is really just a wrapper for SQL pass-through (SPT), that is, it's just a bunch of CURSORSETPROP()s and SQLEXEC()s. As such, the way they work is by passing a string to the back end database via ODBC. This string is interpreted as a command which the back end attempts to execute. Naturally, this command must be formatted as the back end expects and use only functions that it supports.
In your case, you need documentation for SQL Server, which will list supported functions.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up