Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Functions and & SQL Server ODBC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00395707
Message ID:
00395726
Vues:
10
You can ask VFP to convert the SQL datetime value to a VFP date value either by code or through the view designer.

In the view designer. Select "fiels" page, click "properties" and under "data mapping" select "date".

By code: DBSetProp( 'rv_YourView.yourfield', 'Field', 'DataType', 'D' )



>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
Hector Correa
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform