sqllogictest
Check-in [c33e964f18]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an ODBC parameter that should not be NULL.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c33e964f184d91bfa89b2747f4a3d89c3440ce34
User & Date: drh 2008-12-02 15:49:30
Context
2008-12-02
16:06
Fix the schema deleter in the ODBC3 driver so that it works with PostgreSQL. check-in: 0937105b6d user: drh tags: trunk
15:49
Fix an ODBC parameter that should not be NULL. check-in: c33e964f18 user: drh tags: trunk
15:22
Regened after changes to select2.tcl. check-in: 954bc6c11b user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/slt_odbc3.c.

318
319
320
321
322
323
324


325
326
327
328
329
330
331
...
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
    if( !pODBC3conn->zConnStr ){
      fprintf(stderr, "Out of memory at %s:%d\n", __FILE__, __LINE__);
      rc = 1;
    }
  }
  
  if( !rc ){


    /* Build the connection string.   If a DSN or DATABASE
    ** is not specified, use the defaults.
    */
    if( !zConnectStr || !strstr(zConnectStr, "DSN=") ){
      strcat(szConnStrIn, "DSN=" SLT_DSN ";");
    }
    if( !zConnectStr || !strstr(zConnectStr, "DATABASE=") ){
................................................................................
    /* TBD: should we use SQLConnect() here? */
    ret = SQLDriverConnect(pODBC3conn->dbc, 
                           NULL, 
                           (SQLCHAR *)szConnStrIn, 
                           SQL_NTS,
                           pODBC3conn->zConnStr, 
                           1024 * sizeof(SQLCHAR), 
                           NULL,
                           SQL_DRIVER_COMPLETE);
    if( !SQL_SUCCEEDED(ret) && (ret != SQL_SUCCESS_WITH_INFO) ){
      ODBC3_perror("SQLDriverConnect", pODBC3conn->dbc, SQL_HANDLE_DBC);
      rc = 1;
    }
  }
  







>
>







 







|







318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
...
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
    if( !pODBC3conn->zConnStr ){
      fprintf(stderr, "Out of memory at %s:%d\n", __FILE__, __LINE__);
      rc = 1;
    }
  }
  
  if( !rc ){
    SQLSMALLINT outStrLen;

    /* Build the connection string.   If a DSN or DATABASE
    ** is not specified, use the defaults.
    */
    if( !zConnectStr || !strstr(zConnectStr, "DSN=") ){
      strcat(szConnStrIn, "DSN=" SLT_DSN ";");
    }
    if( !zConnectStr || !strstr(zConnectStr, "DATABASE=") ){
................................................................................
    /* TBD: should we use SQLConnect() here? */
    ret = SQLDriverConnect(pODBC3conn->dbc, 
                           NULL, 
                           (SQLCHAR *)szConnStrIn, 
                           SQL_NTS,
                           pODBC3conn->zConnStr, 
                           1024 * sizeof(SQLCHAR), 
                           &outStrLen,
                           SQL_DRIVER_COMPLETE);
    if( !SQL_SUCCEEDED(ret) && (ret != SQL_SUCCESS_WITH_INFO) ){
      ODBC3_perror("SQLDriverConnect", pODBC3conn->dbc, SQL_HANDLE_DBC);
      rc = 1;
    }
  }