You've described the problem exactly as I encountered it - A. Rafiq's post does miss the point on this. I'm dismayed to hear that the 'SetLocaleInfo' stuff I wrote and posted last June doesn't work for you - though since then I've realized that other factors may influence how it works. I'm pretty sure from the MSDN docs I have that only the current execution thread gets its locale picture changed from it's creator's default - so perhaps the DLL calls at the bottom of the VIs I wrote, as far as 'reentrant' vs. 'UI thread' setting, affect whether it works. Then too, I wrote these and only ever tried them under LV5.1 - perhaps LV6 manages the API calls differently...
I was in Austin at NIWeek and specifically asked Crystal Drumheller, the lead on t
he new DB Connectivity Toolkit, about this issue. It's my understanding from her that since the new toolkit returns date/time fields (indeed all field types, I suppose) via ActiveX variants, that the conversion to string/locale issues are a thing of the past. I have a late beta release of the DBC toolkit - but confess to having not explored this thoroughly. It only runs under LV6, which I didn't upgrade to until recently.
I'll be the first to agree with you that all this mucking around with stuff that has potential side effects on the system-wide locale, registry, etc., is quite distasteful. It did seem to solve my particular issues at the time (last fall), but perhaps I only fooled myself. I'm pretty sure I tested it at the time and saw that the running LV app changed formats around without requiring a restart. If the new DBC is not a viable option for you, perhaps you can give me a holler if you want to pursue the SetLocaleInfo stuff further. I generally pay more attention
to Info-LabVIEW than to comp.lang.labview and this gateway to it. But I noticed this thread and will check it again over the next few days.
Best,
Dave
David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer