summaryrefslogtreecommitdiff
path: root/libodbcpp/bind.cpp
blob: 0808bbb2f7ad8b24031a33a94f8f3dcdd17ea228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
}