开发者

How to remove file DSN by ODBC API using C++

开发者 https://www.devze.com 2023-03-08 20:20 出处:网络
I use SQLWriteFileDSN to create ODBC file DSN. Now what I want to do is to remove the DSN. Based on http://msdn.microsoft.com/en-us/library/ms403313.开发者_如何转开发aspx, I have tried to use SQLConfi

I use SQLWriteFileDSN to create ODBC file DSN. Now what I want to do is to remove the DSN. Based on http://msdn.microsoft.com/en-us/library/ms403313.开发者_如何转开发aspx, I have tried to use SQLConfigDataSource to do it, but it always returns 0 and dsn file is not deleted.

driver: Microsoft Text Driver (*.txt; *.csv)

function call: SQLConfigDataSource(NULL, ODBC_REMOVE_DSN, "Microsoft Text Driver (*.txt; *.csv)", "DSN=filedsnname");

Any idea about this?


Why do you need to do this via ODBC?

Surely, you just need to delete the file using whatever mechanism C/C++/C# provides...

I am not a programmer so I cannot give you a code sample.

0

精彩评论

暂无评论...
验证码 换一张
取 消