From c3f2a299a734494a61a49709a8e4cc335570b3d3 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 18 Feb 2011 12:58:59 +0000 Subject: Handle the case when the driver tries to save more data than the buffer is big enough, and doesn't bother to mention it Use the driver's bindSize as a hint as to how much buffer to allocate up front --- libodbcpp/column.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'libodbcpp/column.cpp') diff --git a/libodbcpp/column.cpp b/libodbcpp/column.cpp index b041bd4..a34946a 100644 --- a/libodbcpp/column.cpp +++ b/libodbcpp/column.cpp @@ -17,13 +17,14 @@ ODBC::Column::~Column() { } -void -ODBC::Column::resize(SQLHANDLE) +bool +ODBC::Column::resize() { + return false; } -void -ODBC::CharArrayColumn::resize(SQLHANDLE) +bool +ODBC::CharArrayColumn::resize() { if (bindLen >= SQLLEN(data.size())) { data.resize(bindLen + 1); @@ -32,12 +33,9 @@ ODBC::CharArrayColumn::resize(SQLHANDLE) paramBound = false; Param::bind(); } + return true; } -} - -void -ODBC::Column::onScroll() -{ + return false; } bool -- cgit v1.2.3