Creates an UDL-File (Universal Data Link) from an existing ADO-ConnectionString. Unfortunately the DataLinks-Object in the "Microsoft OLE DB Service Component 1.0 Type Library" provides some prompting dialogs to choose an ADO-Connection, but a save method to get an UDL-file is missing. So I coded this. Note that this wasn't as easy as it looks now, cause an UDL-file is no normal INI-file, although it seems to be one. The first thing is, that it must be saved in unicode. The second and very astonishing thing is, that the second line, which seems to be a missable comment, is very important and must be exactly as it is. Otherwise the UDL-file wont work! Comments and votes are welcome.
Inputs
ConnectionString As String, Filename As String
Assumes
Needs to have a reference to the "Microsoft Scripting Runtime".
Returns
None, but creates as file.
Side Effects
Overwrites the given Filename, if already exists.