/ InitBind: Initialize the bind structure according to type. */ /
| 1364 | /* InitBind: Initialize the bind structure according to type. */ |
| 1365 | /***********************************************************************/ |
| 1366 | void MYSQLCOL::InitBind(PGLOBAL g) |
| 1367 | { |
| 1368 | PTDBMY tdbp = (PTDBMY)To_Tdb; |
| 1369 | |
| 1370 | assert(tdbp->Bind && Rank < tdbp->Nparm); |
| 1371 | |
| 1372 | Bind = &tdbp->Bind[Rank]; |
| 1373 | memset(Bind, 0, sizeof(MYSQL_BIND)); |
| 1374 | |
| 1375 | if (Buf_Type == TYPE_DATE) { |
| 1376 | Bind->buffer_type = PLGtoMYSQL(TYPE_STRING, false); |
| 1377 | Bind->buffer = (char *)PlugSubAlloc(g,NULL, 20); |
| 1378 | Bind->buffer_length = 20; |
| 1379 | Bind->length = &Slen; |
| 1380 | } else { |
| 1381 | Bind->buffer_type = PLGtoMYSQL(Buf_Type, false); |
| 1382 | Bind->buffer = (char *)Value->GetTo_Val(); |
| 1383 | Bind->buffer_length = Value->GetClen(); |
| 1384 | Bind->length = (IsTypeChar(Buf_Type)) ? &Slen : NULL; |
| 1385 | } // endif Buf_Type |
| 1386 | |
| 1387 | } // end of InitBind |
| 1388 | |
| 1389 | /***********************************************************************/ |
| 1390 | /* ReadColumn: */ |
no test coverage detected