I now see your dilemma.
Not sure of the appropiate API calls, but an alternative may be to simple
add the appropiate registry entries for the DSN. I would try;
1) Export your registry to a disk file,
2) Create a new DSN with your desired properties via the control panel
applet,
3) Export your registry to a second disk file
Comparing the 2 export images should give you a snapshot of what registry
entries are being created, which you may then be able to insert via you .Net
app. Not "by the book" Im sure, but it may prove just as effective.
- Colin
Lewt said:
Colin, thanks for your quick response. I know all about the OLE stuff.
Yes, it works great. Unfortunately, some of us don't have the liberty of
being able to utilize that.
I am creating a deployment project in which I do not have control over the
source code for the original application. Unfortunately, for me, this app
uses ODBC DSNs to connect to multiple access databases. This means that on
the target computer I need the ability to create those DSNs - since asking
the user to figure out the ODBC Administrator is way too much to ask of the
users these days.
Please pardon me if I'm laying it on thick, but I've been scowering the
Internet looking for this missing link (between C# & the .NET framework and
this MFC? SQLConfigDataSoure function), but all I can find is several people
asking and responses of alternative methodologies.
I know it can be done - there is a company out there who has done it and
is selling the code. Unfortunately, I paid them the money and they ave not
delivered the code - legal proceedings may be forthcoming. In the meantime,
does anyone know how to do this? Thanks!!