Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC Cursor Datetime type to Date
Message
De
25/10/2001 18:10:11
Monte Murdock
Universal American Mortgage Company
Clearwater, Floride, États-Unis
 
 
À
25/10/2001 18:09:16
Monte Murdock
Universal American Mortgage Company
Clearwater, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00573416
Message ID:
00573442
Vues:
28
>>>>>Does anyone know how to turn a DateTime type field to a Date type field in a SQLEXEC cursor, not a remote view?
>>>>>
>>>>>TIA
>>>>>
>>>>>MOnTe
>>>>
>>>>Have you looked at TTOD() or TTOC()?
>>>
>>>I am changing the SQLEXEC cursor to allow updates. The date column in the cursor can be changed in a grid and you cannot update a calculated column (e.g. TTOD(closed_date)). Basically, I want to do to a SQLEXEC cursor what you can already do to a remote view like with the following command:
>>>DBSetProp('rvClosed.closed_date', 'Field', 'DataType', "D")
>>>
>>>Any other ideas?
>>
>>What's your backend database? If it's SQL Server you could use the CONVERT() function to return only the date portion in a character field. Then whenever you send the updates SQL Server will not complain about the type, as long as it's in a date format that it can understand. I think it's Convert(character(10), myField, 121) to get the date portion only on a character field.
>>
>>How are you planning to send the updates back?
>
>
>I'm using SQL Server. Also, I've tried the SQL Server CONVERT function, however, the date is not validated...I would have to write so sort of textbox date validator to check the date...that is what I was trying to get away from.

I am using TABLEUPDATE on the SQLEXEC cursor.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform