Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

calling SQLRemoveDriver does not update the lpdwUsageCount on linux

Help
2013-09-19
2013-09-19
  • ameybarve15
    ameybarve15
    2013-09-19

    Thanks in advance.

    SQLRemoveDriver returns true, also I checked entry into odbcinst.ini and driver entry is also removed.
    Here's my code : It prints Usage count is 1.

    DWORD nUsageCount;
    BOOL bRemoveDSNs = false;
    if (!SQLRemoveDriver("ODBCDRIVERNAME",bRemoveDSNs ,&nUsageCount)) {
    printf("Error \n");
    }
    else {
    printf( "Usage count is %d.\n", (int)nUsageCount );
    }

    I also observed that SQLInstallDriverEx does not increment nUsageCount past 1, irrespective of how many times you call SQLInstallDriverEx. Why is that So?