/ Set DBQ and get the new file name into the connect string. */ /
| 274 | /* Set DBQ and get the new file name into the connect string. */ |
| 275 | /***********************************************************************/ |
| 276 | void TDBODBC::SetFile(PGLOBAL g, PCSZ fn) |
| 277 | { |
| 278 | if (MulConn) { |
| 279 | int n = strlen(MulConn) + strlen(fn) - 1; |
| 280 | |
| 281 | if (n > BufSize) { |
| 282 | // Allocate a buffer larger than needed so the chance |
| 283 | // of having to reallocate it is reduced. |
| 284 | BufSize = n + 6; |
| 285 | Connect = (char*)PlugSubAlloc(g, NULL, BufSize); |
| 286 | } // endif n |
| 287 | |
| 288 | // Make the complete connect string |
| 289 | snprintf(Connect, BufSize, MulConn, fn); |
| 290 | } // endif MultConn |
| 291 | |
| 292 | DBQ = PlugDup(g, fn); |
| 293 | } // end of SetFile |
| 294 | |
| 295 | /***********************************************************************/ |
| 296 | /* MakeInsert: make the Insert statement used with ODBC connection. */ |
no test coverage detected