Hi!
>In FoxTalk was described methods of creatiung DSN in the code, I like also to delete some dsn
>My help to win32api does not have description to sqlconfig and rest of functions from odbc32.dll
You can delete DSN using SQLConfigDataSource with ODBC_REMOVE_DSN or ODBC_REMOVE_SYS_DSN request. Here a C description:
// SQLConfigDataSource request flags
#define ODBC_ADD_DSN 1 // Add data source
#define ODBC_CONFIG_DSN 2 // Configure (edit) data source
#define ODBC_REMOVE_DSN 3 // Remove data source
#define ODBC_ADD_SYS_DSN 4 // add a system DSN
#define ODBC_CONFIG_SYS_DSN 5 // Configure a system DSN
#define ODBC_REMOVE_SYS_DSN 6 // remove a system DSN
#define ODBC_REMOVE_DEFAULT_DSN 7 // remove the default DSN
BOOL INSTAPI SQLConfigDataSource (HWND hwndParent,
WORD fRequest,
LPCSTR lpszDriver,
LPCSTR lpszAttributes);
Also take a look on McCasland's ODBC_DSN class in download section.
Alexander
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only