Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDL files and FILETOSTR()
Message
From
22/07/2008 17:41:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01333299
Message ID:
01333315
Views:
10
>Hi gang,
>
>I'm attempting to create an interface which allows a user to select from a list of available back-end database connections. I have a group of UDL files which contain the connection information (this encompasses some non-SQL Server backends as well), and I'm attempting to read these files with the FILETOSTR() function and parse some of the information in order to build the list.
>
>HERE'S THE PROBLEM: When each file comes in using FILETOSTR(), it's high-order-bit garbage (either Unicode or some other unreadable stuff). Each file opens in Notepad without a hitch, and shows the text as expected.
>
>There's no additional parameters on the FILETOSTR function, and I can't seem to locate a way to successfully convert this junk out of Unicode (or whatever it is) and back to ANSI.

It may be unicode - try

hFile="myfilename"
AsciiFileContent=Strconv(Strconv(Filetostr(hFile),6,1029),2,1029)

Instead of 1029 it should probably be 1033 (for Western).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform