MCPcopy Create free account
hub / github.com/apache/arrow / UnregisterDsn

Function UnregisterDsn

cpp/src/arrow/flight/sql/odbc/odbc_impl/system_dsn.cc:91–105  ·  view source on GitHub ↗

* Unregister specified DSN. * * @param dsn DSN name. * @return True on success and false on fail. */

Source from the content-addressed store, hash-verified

89 * @return True on success and false on fail.
90 */
91bool UnregisterDsn(const std::wstring& dsn) {
92#ifdef __linux__
93 auto dsn_vec = ODBC::ToSqlWCharVector(dsn);
94 const SQLWCHAR* dsn_arr = dsn_vec.data();
95#else
96 // Windows and macOS
97 const SQLWCHAR* dsn_arr = dsn.c_str();
98#endif
99 if (SQLRemoveDSNFromIni(dsn_arr)) {
100 return true;
101 }
102
103 PostLastInstallerError();
104 return false;
105}
106
107/**
108 * Register DSN with specified configuration.

Callers 3

TYPED_TESTFunction · 0.85
TEST_FFunction · 0.85
ConfigDSNWFunction · 0.85

Calls 3

ToSqlWCharVectorFunction · 0.85
PostLastInstallerErrorFunction · 0.85
dataMethod · 0.45

Tested by 2

TYPED_TESTFunction · 0.68
TEST_FFunction · 0.68