Not sure if this is related to DB but a client just received the message
'Invalid argument to date encode' installing on a new PC. Our application
is loaded at a number of client sites but this is the first time I have
heard this one. Anyone know what it means and why it is happening? I might
add, the LAN administrator at this client site has installed on other PCs
without any problems and also seems to think the date settings for other PCs
is the same.
Thanks
Alex
It sounds like the Windows date format in the control panel is different
for that machine and you are issuing something like StrToDate.
A work-around is the place something similar to the following line at the
start of your app:
ShortDateFormat := 'dd/mm/yyyy'; // uses SysUtils
Mike Orriss (TeamB)
(Unless stated otherwise, my replies relate to Delphi 4.03)
(Unsolicited e-mail replies will most likely be ignored)
You will also need to set Application.UpdateFormatSetting := False,
typically one line above it, so the application won't reread the values if
the user changes them from the Control Panel.
May the code be with you.
Marcelo Lopez Ruiz
Thanks - that property had escaped me.
I do already have the ShortDateFormat := 'dd/mm/yyyy' statement in all my
products but I definitely do not have Application.UpdateFormatSetting :=
False. I will try this.
In the meantime if the user makes sure their Windows date format in Control
Panel is correct then this should not be a problem?
Alex
Mike Orriss (TeamB) wrote in message ...
If when you say correct, you mean that the Windows date format matches that
passed to StrToDate functions, then yes.