Hi!
Check the format of the date field stored on SQL server. If this is just a character field - here is answer. When you prepare textboxes, you prepare them to work with date field, thus they appear correctly. When you query data, date is in character field, so textbox switched to work with character string, thus it no longer ensitive to date settings, it just shows what is in the field.
>I'm running into an odd date format problem.
>
>I'm connecting to an SQL database through ODBC (v3.70.06.23) from a simple VFP application. When I query the database through SQLEXEC() my application date format changes from MM/DD/YYYY to YYYY.MM.DD on all the controls(text boxes, report fields). Once the application is restarted, the correct format is there once again.
>
>I looked into the regional settings while the application is running, played around with the various ANSI and regional ODBC driver settings, and tried SET DATE but all to no avail.
>
>I'm trying to replicate the problem in the office on another SQL Server database but I cannot make it happen.
>
>Has anyone ever run into this situation before? Any suggestions?
>
>Tom
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.