How do I create an ODBC DSN entry using C#?

前端 未结 7 1235
旧巷少年郎
旧巷少年郎 2020-11-29 23:43

I\'m working on a legacy application that has a C++ extended stored procedure. This xsproc uses ODBC to connect to the database, which means it requires a DSN to be config

7条回答
  •  情歌与酒
    2020-11-30 00:00

    There is an API for doing stuff like this. Using the API will also make sure that your application will stay compatible with newer versions of Windows. The API can be found here:

    http://msdn.microsoft.com/en-us/library/ms716476(VS.85).aspx

    PInvoking this function in c# can be found on PInvoke.net.

提交回复
热议问题