summaryrefslogtreecommitdiff
path: root/libodbcpp/bind.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2006-07-08 16:32:05 +0000
committerrandomdan <randomdan@localhost>2006-07-08 16:32:05 +0000
commit2a1fa15d8baa4eda37e17b2e9362f8bde17a939d (patch)
tree09386e52320b7c52a521ab56fc7553896e639dcd /libodbcpp/bind.cpp
downloadlibdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.tar.bz2
libdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.tar.xz
libdbpp-odbc-2a1fa15d8baa4eda37e17b2e9362f8bde17a939d.zip
libcodbcpp initial release
Diffstat (limited to 'libodbcpp/bind.cpp')
-rw-r--r--libodbcpp/bind.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/libodbcpp/bind.cpp b/libodbcpp/bind.cpp
new file mode 100644
index 0000000..0808bbb
--- /dev/null
+++ b/libodbcpp/bind.cpp
@@ -0,0 +1,36 @@
+#include <sqlext.h>
+#include "command.h"
+#include "param.h"
+
+ODBC::BindBase::BindBase() :
+ bindSize(0),
+ bindLen(0)
+{
+}
+
+ODBC::Bind<unsigned char *>::~Bind()
+{
+ if (value) {
+ delete[] value;
+ }
+}
+
+SQLINTEGER
+ODBC::BindBase::length() const
+{
+ return bindLen;
+}
+
+SQLUINTEGER
+ODBC::BindBase::size() const
+{
+ return bindSize;
+}
+
+bool
+ODBC::BindBase::isNull() const
+{
+ return (bindLen == SQL_NULL_DATA);
+}
+
+