none
Writing odbc driver on windows RRS feed

  • Question

  • Hi,

    In short I m trying to write odbc driver sample, for now only SQLConnect.

    I managed to create setup part of driver and inside that I called SQLWriteDSN function to add key in registry,ODBC.INI.

    Now problem is when I created a console application and tried to connect to my DSN, it does not call my SQLConnect.

    ConsoleApplicat 55b0-6b8c EXIT  SQLSetEnvAttr  with return code 0 (SQL_SUCCESS)
    SQLHENV             0x00000219AC3884B0
    SQLINTEGER                 200 <SQL_ATTR_ODBC_VERSION>
    SQLPOINTER                 3 <SQL_OV_ODBC3>
    SQLINTEGER                   0 


    ConsoleApplicat 55b0-6b8c ENTER SQLAllocHandle 
    SQLSMALLINT                  2 <SQL_HANDLE_DBC>
    SQLHANDLE           0x00000219AC3884B0
    SQLHANDLE *         0x00007FF6888FD178


    ConsoleApplicat 55b0-6b8c EXIT  SQLAllocHandle  with return code 0 (SQL_SUCCESS)
    SQLSMALLINT                  2 <SQL_HANDLE_DBC>
    SQLHANDLE           0x00000219AC3884B0
    SQLHANDLE *         0x00007FF6888FD178 ( 0x00000219AC388590)


    ConsoleApplicat 55b0-6b8c ENTER SQLConnectW 
    HDBC                0x00000219AC388590
    WCHAR *             0x00000219AC386B10 [      -3] "AiPandaODBC\ 0"
    SWORD                       -3 
    WCHAR *             0x00007FFD84BD21C0 [      -3] "******\ 0"
    SWORD                       -3 
    WCHAR *             0x00007FFD84BD21C0 [      -3] "******\ 0"
    SWORD                       -3 


    ConsoleApplicat 55b0-6b8c EXIT  SQLConnectW  with return code -1 (SQL_ERROR)
    HDBC                0x00000219AC388590
    WCHAR *             0x00000219AC386B10 [      -3] "AiPandaODBC\ 0"
    SWORD                       -3 
    WCHAR *             0x00007FFD84BD21C0 [      -3] "******\ 0"
    SWORD                       -3 
    WCHAR *             0x00007FFD84BD21C0 [      -3] "******\ 0"
    SWORD                       -3 


    DIAG [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this function (0) 


    ConsoleApplicat 55b0-6b8c ENTER SQLFreeHandle 
    SQLSMALLINT                  1 <SQL_HANDLE_ENV>
    SQLHANDLE           0x00007FF6888FD170


    ConsoleApplicat 55b0-6b8c EXIT  SQLFreeHandle  with return code -2 (SQL_INVALID_HANDLE)
    SQLSMALLINT                  1 <SQL_HANDLE_ENV>
    SQLHANDLE           0x00007FF6888FD170


    ConsoleApplicat 55b0-6b8c ENTER SQLFreeHandle 
    SQLSMALLINT                  2 <SQL_HANDLE_DBC>
    SQLHANDLE           0x00007FF6888FD178


    ConsoleApplicat 55b0-6b8c EXIT  SQLFreeHandle  with return code -2 (SQL_INVALID_HANDLE)
    SQLSMALLINT                  2 <SQL_HANDLE_DBC>
    SQLHANDLE           0x00007FF6888FD178

    Friday, January 10, 2020 12:54 PM

Answers

All replies