Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Datatype in Cursor like in Remote View?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00475394
Message ID:
00475944
Views:
40
Hi Vlad,
I already do use a mixture of RV and SPT, I just ran into the problem in SPT that a VFP date field comes back from SQL Server as datetime. A textbox now displays the time as well as the date. Not Good! <G> Since the form can be used with both VFP or SQL Server as the backend, I am trying to minimize conditional code. I guess I will have to go back to a RV for this data, I had changed to SPT since it is ReadOnly data.
Thanks,

>Hi!
>
>The only way I know is to use server-side converting functions, for example, you can convert datetime fields on the SQL Server to character values at the server side using convert() function or some other functions. You cannot map field types for SPT, it is available for views only. Anyway, it is not a problem to combine RV and SPT approaches. Following is a solution:
>
>Create temporary databe in run-time. Create connection in it based on the connection string. Create some RV in database and open it. ConnectHandle property of RV cursor will contain connection handle that you can use in all other SPT commands. Now you have both the ability to create and run RV and ability to use SPT.
>
>>Hi All,
>>I am using SPT to populate a cursor from SQL Server. The datatype is datetime but the data is really a date. i.e. Date of Birth. In a Remote View, I can change the datatype to Date. Is there a way to do that to a Cursor?
>>
>>I know I can use ttod() in the ControlSource for the TextBox since it is ReadOnly, but I was just wondering.
>>
>>There is no ALTER CURSOR or CursorSetProp() to make this change that I could find.
>>
>>Am I missing something?
>>
>>(Maybe VFP7.0, I haven't loaded my beta copy yet)
>>
>>TIA,
Bill Armbrecht
VFP MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform