ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [50/68] [abbrv] ignite git commit: IGNITE-3883: ODBC: Implemented data-at-execution dialog. This closes #1073.
Date Tue, 27 Sep 2016 15:26:40 GMT
IGNITE-3883: ODBC: Implemented data-at-execution dialog. This closes #1073.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a4a933eb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a4a933eb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a4a933eb

Branch: refs/heads/ignite-comm-opts2
Commit: a4a933eb708dadb6b67f6c062db32ffeef819184
Parents: 33a6878
Author: Igor Sapego <isapego@gridgain.com>
Authored: Mon Sep 26 17:41:57 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Sep 26 17:41:57 2016 +0300

----------------------------------------------------------------------
 .../src/application_data_buffer_test.cpp        | 129 ++++---
 .../platforms/cpp/odbc-test/src/column_test.cpp |  10 +-
 .../cpp/odbc-test/src/queries_test.cpp          | 144 +++++++-
 .../platforms/cpp/odbc-test/src/row_test.cpp    |   4 +-
 modules/platforms/cpp/odbc/Makefile.am          |   3 +-
 .../platforms/cpp/odbc/include/ignite/odbc.h    |   5 +-
 .../ignite/odbc/app/application_data_buffer.h   |  58 +++-
 .../odbc/include/ignite/odbc/app/parameter.h    |  27 +-
 .../cpp/odbc/include/ignite/odbc/common_types.h |  18 +-
 .../include/ignite/odbc/config/configuration.h  |  17 +-
 .../cpp/odbc/include/ignite/odbc/statement.h    |  58 +++-
 .../platforms/cpp/odbc/project/vs/module.def    |   1 -
 .../odbc/src/app/application_data_buffer.cpp    | 343 ++++++++++++++-----
 .../platforms/cpp/odbc/src/app/parameter.cpp    | 126 ++++++-
 modules/platforms/cpp/odbc/src/common_types.cpp |   3 +
 .../cpp/odbc/src/config/configuration.cpp       |  27 ++
 .../cpp/odbc/src/config/connection_info.cpp     |  35 +-
 modules/platforms/cpp/odbc/src/connection.cpp   |   2 +-
 .../odbc/src/diagnostic/diagnostic_record.cpp   |  18 +
 modules/platforms/cpp/odbc/src/entry_points.cpp |  30 +-
 modules/platforms/cpp/odbc/src/odbc.cpp         |  43 ++-
 modules/platforms/cpp/odbc/src/statement.cpp    | 150 +++++++-
 22 files changed, 992 insertions(+), 259 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
index 1900e75..f62bcd6 100644
--- a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
@@ -43,8 +43,8 @@ BOOST_AUTO_TEST_SUITE(ApplicationDataBufferTestSuite)
 BOOST_AUTO_TEST_CASE(TestPutIntToString)
 {
     char buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -76,8 +76,8 @@ BOOST_AUTO_TEST_CASE(TestPutIntToString)
 BOOST_AUTO_TEST_CASE(TestPutFloatToString)
 {
     char buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -101,8 +101,8 @@ BOOST_AUTO_TEST_CASE(TestPutFloatToString)
 BOOST_AUTO_TEST_CASE(TestPutGuidToString)
 {
     char buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE(TestPutGuidToString)
 BOOST_AUTO_TEST_CASE(TestGetGuidFromString)
 {
     char buffer[] = "1da1ef8f-39ff-4d62-8b72-e8e9f3371801";
-    SqlLen reslen;
+    SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer) - 1, &reslen, 0);
 
@@ -129,8 +129,8 @@ BOOST_AUTO_TEST_CASE(TestGetGuidFromString)
 BOOST_AUTO_TEST_CASE(TestPutBinaryToString)
 {
     char buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -145,8 +145,8 @@ BOOST_AUTO_TEST_CASE(TestPutBinaryToString)
 BOOST_AUTO_TEST_CASE(TestPutStringToString)
 {
     char buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -161,8 +161,8 @@ BOOST_AUTO_TEST_CASE(TestPutStringToString)
 BOOST_AUTO_TEST_CASE(TestPutStringToWstring)
 {
     wchar_t buffer[1024];
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_WCHAR, buffer, sizeof(buffer), &reslen, &offset);
 
@@ -175,8 +175,8 @@ BOOST_AUTO_TEST_CASE(TestPutStringToWstring)
 BOOST_AUTO_TEST_CASE(TestPutStringToLong)
 {
     long numBuf;
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, &offset);
 
@@ -190,8 +190,8 @@ BOOST_AUTO_TEST_CASE(TestPutStringToLong)
 BOOST_AUTO_TEST_CASE(TestPutStringToTiny)
 {
     int8_t numBuf;
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_TINYINT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
@@ -205,8 +205,8 @@ BOOST_AUTO_TEST_CASE(TestPutStringToTiny)
 BOOST_AUTO_TEST_CASE(TestPutStringToFloat)
 {
     float numBuf;
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
@@ -220,8 +220,8 @@ BOOST_AUTO_TEST_CASE(TestPutStringToFloat)
 BOOST_AUTO_TEST_CASE(TestPutIntToFloat)
 {
     float numBuf;
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
@@ -247,8 +247,8 @@ BOOST_AUTO_TEST_CASE(TestPutIntToFloat)
 BOOST_AUTO_TEST_CASE(TestPutFloatToShort)
 {
     short numBuf;
-    SqlLen reslen;
-    size_t* offset = 0;
+    SqlLen reslen = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_SHORT, &numBuf, sizeof(numBuf), &reslen, &offset);
 
@@ -268,7 +268,7 @@ BOOST_AUTO_TEST_CASE(TestPutFloatToShort)
 BOOST_AUTO_TEST_CASE(TestPutDecimalToDouble)
 {
     double numBuf;
-    SqlLen reslen;
+    SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &numBuf, sizeof(numBuf), &reslen, 0);
 
@@ -297,7 +297,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToDouble)
 BOOST_AUTO_TEST_CASE(TestPutDecimalToLong)
 {
     long numBuf;
-    SqlLen reslen;
+    SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, sizeof(numBuf), &reslen, 0);
 
@@ -324,7 +324,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToLong)
 BOOST_AUTO_TEST_CASE(TestPutDecimalToString)
 {
     char strBuf[64];
-    SqlLen reslen;
+    SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, 0);
 
@@ -351,7 +351,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToString)
 BOOST_AUTO_TEST_CASE(TestPutDecimalToNumeric)
 {
     SQL_NUMERIC_STRUCT buf;
-    SqlLen reslen;
+    SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_NUMERIC, &buf, sizeof(buf), &reslen, 0);
 
@@ -432,8 +432,8 @@ BOOST_AUTO_TEST_CASE(TestPutDateToDate)
     SQL_DATE_STRUCT buf = { 0 };
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -451,8 +451,8 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToDate)
     SQL_DATE_STRUCT buf = { 0 };
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -470,8 +470,8 @@ BOOST_AUTO_TEST_CASE(TestPutTimestampToTimestamp)
     SQL_TIMESTAMP_STRUCT buf = { 0 };
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -494,8 +494,8 @@ BOOST_AUTO_TEST_CASE(TestPutDateToTimestamp)
 
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -516,7 +516,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromLong)
 {
     long numBuf = 42;
     SqlLen reslen = sizeof(numBuf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_SIGNED_LONG, &numBuf, reslen, &reslen, &offset);
 
@@ -535,7 +535,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromDouble)
 {
     double numBuf = 43.36;
     SqlLen reslen = sizeof(numBuf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &numBuf, reslen, &reslen, &offset);
 
@@ -554,7 +554,7 @@ BOOST_AUTO_TEST_CASE(TestGetStringFromString)
 {
     char buf[] = "Some data 32d2d5hs";
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
 
@@ -567,7 +567,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromUshort)
 {
     unsigned short numBuf = 7162;
     SqlLen reslen = sizeof(numBuf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT, &numBuf, reslen, &reslen, &offset);
 
@@ -584,7 +584,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromString)
 {
     char buf[] = "28.562";
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
 
@@ -601,7 +601,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromFloat)
 {
     float buf = 207.49f;
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &buf, reslen, &reslen, &offset);
 
@@ -618,7 +618,7 @@ BOOST_AUTO_TEST_CASE(TestGetFloatFromDouble)
 {
     double buf = 893.162;
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &buf, reslen, &reslen, &offset);
 
@@ -635,7 +635,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromString)
 {
     char buf[] = "39";
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf, reslen, &reslen, &offset);
 
@@ -660,7 +660,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromFloat)
 {
     float buf = -107.49f;
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_FLOAT, &buf, reslen, &reslen, &offset);
 
@@ -685,7 +685,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromDouble)
 {
     double buf = 42.97f;
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_DOUBLE, &buf, reslen, &reslen, &offset);
 
@@ -710,7 +710,7 @@ BOOST_AUTO_TEST_CASE(TestGetIntFromBigint)
 {
     uint64_t buf = 19;
     SqlLen reslen = sizeof(buf);
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT, &buf, reslen, &reslen, &offset);
 
@@ -744,8 +744,8 @@ BOOST_AUTO_TEST_CASE(TestGetIntWithOffset)
         { 42, sizeof(uint64_t) }
     };
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
 
@@ -779,8 +779,8 @@ BOOST_AUTO_TEST_CASE(TestSetStringWithOffset)
         { "", 0 }
     };
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0].val, sizeof(buf[0].val), &buf[0].reslen, &offsetPtr);
 
@@ -814,8 +814,8 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromString)
     char buf[] = "1999-02-22";
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
 
@@ -837,16 +837,11 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromString)
 
 BOOST_AUTO_TEST_CASE(TestGetTimestampFromString)
 {
-                LOG_MSG("Test\n");
-                LOG_MSG("Test\n");
-                LOG_MSG("Test\n");
-                LOG_MSG("Test\n");
-
     char buf[] = "2018-11-01 17:45:59";
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_CHAR, &buf[0], sizeof(buf), &reslen, &offsetPtr);
 
@@ -876,8 +871,8 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromDate)
 
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -907,8 +902,8 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromDate)
 
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TDATE, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -942,8 +937,8 @@ BOOST_AUTO_TEST_CASE(TestGetTimestampFromTimestamp)
 
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 
@@ -978,8 +973,8 @@ BOOST_AUTO_TEST_CASE(TestGetDateFromTimestamp)
 
     SqlLen reslen = sizeof(buf);
 
-    size_t offset = 0;
-    size_t* offsetPtr = &offset;
+    int offset = 0;
+    int* offsetPtr = &offset;
 
     ApplicationDataBuffer appBuf(IGNITE_ODBC_C_TYPE_TTIMESTAMP, &buf, sizeof(buf), &reslen, &offsetPtr);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc-test/src/column_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/column_test.cpp b/modules/platforms/cpp/odbc-test/src/column_test.cpp
index 4864a6a..6cbea8b 100644
--- a/modules/platforms/cpp/odbc-test/src/column_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/column_test.cpp
@@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(TestColumnShort)
 
     short shortBuf = 0;
     SqlLen reslen = 0;
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_SIGNED_SHORT, &shortBuf, sizeof(shortBuf), &reslen, &offset);
 
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(TestColumnString)
 
     char strBuf[1024] = {};
     SqlLen reslen = 0;
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
 
@@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE(TestColumnStringSeveral)
 
     std::string strBuf(data.size() / 3 + 2, 0);
     SqlLen reslen = 0;
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf[0], strBuf.size(), &reslen, &offset);
 
@@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
 
     char strBuf[1024] = {};
     SqlLen reslen = 0;
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
 
@@ -287,4 +287,4 @@ BOOST_AUTO_TEST_CASE(TestColumnMultiString)
     BOOST_REQUIRE(column2.GetUnreadDataLength() == 0);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
+BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc-test/src/queries_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/queries_test.cpp b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
index 7c10527..f0168bd 100644
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@ -174,8 +174,11 @@ struct QueriesTestSuiteFixture
 
         SQLRETURN ret;
 
-        TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5), BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
-        TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12), BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 456));
+        TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+            BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+
+        TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
+            BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 456));
 
         testCache.Put(1, in1);
         testCache.Put(2, in2);
@@ -335,8 +338,11 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsString)
 
     SQLRETURN ret;
 
-    TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5), BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
-    TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12), BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
+    TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+        BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+
+    TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
+        BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
 
     testCache.Put(1, in1);
     testCache.Put(2, in2);
@@ -430,7 +436,8 @@ BOOST_AUTO_TEST_CASE(TestOneRowString)
 
     SQLRETURN ret;
 
-    TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5), BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+    TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+        BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
 
     testCache.Put(1, in);
 
@@ -493,7 +500,8 @@ BOOST_AUTO_TEST_CASE(TestOneRowStringLen)
 
     SQLRETURN ret;
 
-    TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5), BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+    TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+        BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
 
     testCache.Put(1, in);
 
@@ -535,4 +543,128 @@ BOOST_AUTO_TEST_CASE(TestOneRowStringLen)
     BOOST_CHECK(ret == SQL_NO_DATA);
 }
 
+BOOST_AUTO_TEST_CASE(TestDataAtExecution)
+{
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+
+    SQLRETURN ret;
+
+    TestType in1(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+        BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+
+    TestType in2(8, 7, 6, 5, "4", 3.0f, 2.0, false, Guid(1, 0), BinaryUtils::MakeDateGmt(1976, 1, 12),
+        BinaryUtils::MakeTimestampGmt(1978, 8, 21, 23, 13, 45, 999999999));
+
+    testCache.Put(1, in1);
+    testCache.Put(2, in2);
+
+    const size_t columnsCnt = 11;
+
+    SQLLEN columnLens[columnsCnt] = { 0 };
+    SQLCHAR columns[columnsCnt][ODBC_BUFFER_SIZE] = { 0 };
+
+    // Binding columns.
+    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+    {
+        ret = SQLBindCol(stmt, i + 1, SQL_C_CHAR, &columns[i], ODBC_BUFFER_SIZE, &columnLens[i]);
+
+        if (!SQL_SUCCEEDED(ret))
+            BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+    }
+
+    SQLCHAR request[] = "SELECT i8Field, i16Field, i32Field, i64Field, strField, "
+        "floatField, doubleField, boolField, guidField, dateField, timestampField FROM TestType "
+        "WHERE i32Field = ? AND strField = ?";
+
+    ret = SQLPrepare(stmt, request, SQL_NTS);
+
+    SQLLEN ind1 = 1;
+    SQLLEN ind2 = 2;
+
+    SQLLEN len1 = SQL_DATA_AT_EXEC;
+    SQLLEN len2 = SQL_LEN_DATA_AT_EXEC(static_cast<SQLLEN>(in1.strField.size()));
+
+    ret = SQLBindParam(stmt, 1, SQL_C_SLONG, SQL_INTEGER, 100, 100, &ind1, &len1);
+
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindParam(stmt, 2, SQL_C_CHAR, SQL_VARCHAR, 100, 100, &ind2, &len2);
+
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLExecute(stmt);
+
+    BOOST_REQUIRE_EQUAL(ret, SQL_NEED_DATA);
+
+    void* oind;
+
+    ret = SQLParamData(stmt, &oind);
+
+    BOOST_REQUIRE_EQUAL(ret, SQL_NEED_DATA);
+
+    if (oind == &ind1)
+        ret = SQLPutData(stmt, &in1.i32Field, 0);
+    else if (oind == &ind2)
+        ret = SQLPutData(stmt, (SQLPOINTER)in1.strField.c_str(), (SQLLEN)in1.strField.size());
+    else
+        BOOST_FAIL("Unknown indicator value");
+
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLParamData(stmt, &oind);
+
+    BOOST_REQUIRE_EQUAL(ret, SQL_NEED_DATA);
+
+    if (oind == &ind1)
+        ret = SQLPutData(stmt, &in1.i32Field, 0);
+    else if (oind == &ind2)
+        ret = SQLPutData(stmt, (SQLPOINTER)in1.strField.c_str(), (SQLLEN)in1.strField.size());
+    else
+        BOOST_FAIL("Unknown indicator value");
+
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLParamData(stmt, &oind);
+
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLFetch(stmt);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[0])), "1");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[1])), "2");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[2])), "3");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[3])), "4");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[4])), "5");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[5])), "6");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[6])), "7");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[7])), "1");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[8])), "00000000-0000-0008-0000-000000000009");
+    // Such format is used because Date returned as Timestamp.
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[9])), "1987-06-05 00:00:00");
+    BOOST_CHECK_EQUAL(std::string(reinterpret_cast<char*>(columns[10])), "1998-12-27 01:02:03");
+
+    BOOST_CHECK_EQUAL(columnLens[0], 1);
+    BOOST_CHECK_EQUAL(columnLens[1], 1);
+    BOOST_CHECK_EQUAL(columnLens[2], 1);
+    BOOST_CHECK_EQUAL(columnLens[3], 1);
+    BOOST_CHECK_EQUAL(columnLens[4], 1);
+    BOOST_CHECK_EQUAL(columnLens[5], 1);
+    BOOST_CHECK_EQUAL(columnLens[6], 1);
+    BOOST_CHECK_EQUAL(columnLens[7], 1);
+    BOOST_CHECK_EQUAL(columnLens[8], 36);
+    BOOST_CHECK_EQUAL(columnLens[9], 19);
+    BOOST_CHECK_EQUAL(columnLens[10], 19);
+
+    ret = SQLFetch(stmt);
+    BOOST_CHECK(ret == SQL_NO_DATA);
+}
+
+
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc-test/src/row_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/row_test.cpp b/modules/platforms/cpp/odbc-test/src/row_test.cpp
index 1fcd43e..f38e9c5 100644
--- a/modules/platforms/cpp/odbc-test/src/row_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/row_test.cpp
@@ -82,7 +82,7 @@ void CheckRowData(Row& row, size_t rowIdx)
     char strBuf[1024];
     SQLGUID guidBuf;
     char bitBuf;
-    size_t* offset = 0;
+    int* offset = 0;
 
     ApplicationDataBuffer appLongBuf(type_traits::IGNITE_ODBC_C_TYPE_SIGNED_LONG, &longBuf, sizeof(longBuf), &reslen, &offset);
     ApplicationDataBuffer appStrBuf(type_traits::IGNITE_ODBC_C_TYPE_CHAR, &strBuf, sizeof(strBuf), &reslen, &offset);
@@ -206,4 +206,4 @@ BOOST_AUTO_TEST_CASE(TestTwoRows)
     CheckRowData(row, 1);
 }
 
-BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
+BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/Makefile.am b/modules/platforms/cpp/odbc/Makefile.am
index 1781bc0..3c8b37a 100644
--- a/modules/platforms/cpp/odbc/Makefile.am
+++ b/modules/platforms/cpp/odbc/Makefile.am
@@ -34,7 +34,8 @@ AM_CXXFLAGS = \
     -std=c++0x
 
 libignite_odbc_la_LIBADD = \
-    @top_srcdir@/binary/libignite-binary.la
+    @top_srcdir@/binary/libignite-binary.la \
+    -lodbcinst
 
 libignite_odbc_la_LDFLAGS = \
     -no-undefined \

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc.h b/modules/platforms/cpp/odbc/include/ignite/odbc.h
index 40158dd..ec0861c 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc.h
@@ -252,6 +252,9 @@ namespace ignite
                                 SQLSMALLINT scope,
                                 SQLSMALLINT nullable);
 
+    SQLRETURN SQLParamData(SQLHSTMT stmt, SQLPOINTER* value);
+
+    SQLRETURN SQLPutData(SQLHSTMT stmt, SQLPOINTER data, SQLLEN strLengthOrIndicator);
 } // namespace ignite
 
-#endif //_IGNITE_ODBC
\ No newline at end of file
+#endif //_IGNITE_ODBC

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h b/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
index ed24359..0ce7818 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/app/application_data_buffer.h
@@ -56,7 +56,8 @@ namespace ignite
                  * @param reslen Resulting data length.
                  * @param offset Pointer to buffer and reslen offset pointer.
                  */
-                ApplicationDataBuffer(type_traits::IgniteSqlType type, void* buffer, SqlLen buflen, SqlLen* reslen, size_t** offset = 0);
+                ApplicationDataBuffer(type_traits::IgniteSqlType type, void* buffer,
+                    SqlLen buflen, SqlLen* reslen, int** offset = 0);
 
                 /**
                  * Copy constructor.
@@ -83,7 +84,7 @@ namespace ignite
                  *
                  * @param offset Pointer to offset pointer.
                  */
-                void SetPtrToOffsetPtr(size_t** offset)
+                void SetPtrToOffsetPtr(int** offset)
                 {
                     this->offset = offset;
                 }
@@ -272,6 +273,20 @@ namespace ignite
                 const SqlLen* GetResLen() const;
 
                 /**
+                 * Get raw data.
+                 *
+                 * @return Buffer data.
+                 */
+                void* GetData();
+
+                /**
+                 * Get result data length.
+                 *
+                 * @return Data length pointer.
+                 */
+                SqlLen* GetResLen();
+
+                /**
                  * Get buffer size in bytes.
                  *
                  * @return Buffer size.
@@ -281,21 +296,42 @@ namespace ignite
                     return buflen;
                 }
 
-            private:
                 /**
-                 * Get raw data.
+                 * Check if the data is going to be provided at execution.
                  *
-                 * @return Buffer data.
+                 * @return True if the data is going to be provided
+                 *     at execution.
                  */
-                void* GetData();
+                bool IsDataAtExec() const;
 
                 /**
-                 * Get result data length.
+                 * Get size of the data that is going to be provided at
+                 * execution.
                  *
-                 * @return Data length pointer.
+                 * @return Size of the data that is going to be provided
+                 *     at execution.
                  */
-                SqlLen* GetResLen();
+                size_t GetDataAtExecSize() const;
+
+                /**
+                 * Get size of the input buffer.
+                 *
+                 * @return Input buffer size, or zero if the data is going
+                 *     to be provided at execution.
+                 */
+                size_t GetInputSize() const;
+
+                /**
+                 * Get buffer type.
+                 *
+                 * @return Buffer type.
+                 */
+                type_traits::IgniteSqlType GetType() const
+                {
+                    return type;
+                }
 
+            private:
                 /**
                  * Put value of numeric type in the buffer.
                  *
@@ -374,7 +410,7 @@ namespace ignite
                 SqlLen* reslen;
 
                 /** Pointer to implementation pointer to application offset */
-                size_t** offset;
+                int** offset;
             };
 
             /** Column binging map type alias. */
@@ -383,4 +419,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_ODBC_APP_APPLICATION_DATA_BUFFER
\ No newline at end of file
+#endif //_IGNITE_ODBC_APP_APPLICATION_DATA_BUFFER

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc/app/parameter.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/app/parameter.h b/modules/platforms/cpp/odbc/include/ignite/odbc/app/parameter.h
index d1ea697..0bd9395 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/app/parameter.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/app/parameter.h
@@ -90,6 +90,25 @@ namespace ignite
                  */
                 ApplicationDataBuffer& GetBuffer();
 
+                /**
+                 * Reset stored at-execution data.
+                 */
+                void ResetStoredData();
+
+                /**
+                 * Check if all the at-execution data has been stored.
+                 * @return
+                 */
+                bool IsDataReady() const;
+
+                /**
+                 * Put at-execution data.
+                 *
+                 * @param data Data buffer pointer.
+                 * @param len Data length.
+                 */
+                void PutData(void* data, SqlLen len);
+
             private:
                 /** Underlying data buffer. */
                 ApplicationDataBuffer buffer;
@@ -102,6 +121,12 @@ namespace ignite
 
                 /** IPD decimal digits. */
                 int16_t decDigits;
+
+                /** User provided null data at execution. */
+                bool nullData;
+
+                /** Stored at-execution data. */
+                std::vector<int8_t> storedData;
             };
 
             /** Parameter binging map type alias. */
@@ -110,4 +135,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_ODBC_APP_PARAMETER
\ No newline at end of file
+#endif //_IGNITE_ODBC_APP_PARAMETER

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h b/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
index b01ec76..354cf08 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/common_types.h
@@ -21,6 +21,8 @@
 #include <stdint.h>
 #include "system/odbc_constants.h"
 
+#include <ignite/odbc/system/odbc_constants.h>
+
 namespace ignite
 {
     namespace odbc
@@ -42,7 +44,10 @@ namespace ignite
             SQL_RESULT_ERROR,
 
             /** No more data. */
-            SQL_RESULT_NO_DATA
+            SQL_RESULT_NO_DATA,
+
+            /** No more data. */
+            SQL_RESULT_NEED_DATA
         };
 
         /**
@@ -68,9 +73,15 @@ namespace ignite
              */
             SQL_STATE_01S02_OPTION_VALUE_CHANGED,
 
+            /** String data, length mismatch. */
+            SQL_STATE_22026_DATA_LENGTH_MISMATCH,
+
             /** Invalid cursor state. */
             SQL_STATE_24000_INVALID_CURSOR_STATE,
 
+            /** Invalid descriptor index. */
+            SQL_STATE_07009_INVALID_DESCRIPTOR_INDEX,
+
             /**
              * The driver was unable to establish a connection with the data
              * source.
@@ -99,6 +110,9 @@ namespace ignite
              */
             SQL_STATE_HY001_MEMORY_ALLOCATION,
 
+            /** Invalid use of null pointer. */
+            SQL_STATE_HY009_INVALID_USE_OF_NULL_POINTER,
+
             /** Function sequence error. */
             SQL_STATE_HY010_SEQUENCE_ERROR,
 
@@ -221,4 +235,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_ODBC_COMMON_TYPES
\ No newline at end of file
+#endif //_IGNITE_ODBC_COMMON_TYPES

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
index b5f385e..4fe4f1b 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/config/configuration.h
@@ -167,10 +167,7 @@ namespace ignite
                  *
                  * @param port Server port.
                  */
-                void SetTcpPort(uint16_t port)
-                {
-                    arguments[Key::port] = common::LexicalCast<std::string>(port);
-                }
+                void SetTcpPort(uint16_t port);
 
                 /**
                  * Get DSN.
@@ -217,10 +214,7 @@ namespace ignite
                  *
                  * @param server Server host.
                  */
-                void SetHost(const std::string& server)
-                {
-                    arguments[Key::server] = server;
-                }
+                void SetHost(const std::string& server);
 
                 /**
                  * Get cache.
@@ -257,10 +251,7 @@ namespace ignite
                  *
                  * @param address Address.
                  */
-                void SetAddress(const std::string& address)
-                {
-                    arguments[Key::address] = address;
-                }
+                void SetAddress(const std::string& address);
 
                 /**
                  * Get protocol version.
@@ -357,4 +348,4 @@ namespace ignite
     }
 }
 
-#endif //_IGNITE_ODBC_CONFIG_CONFIGURATION
\ No newline at end of file
+#endif //_IGNITE_ODBC_CONFIG_CONFIGURATION

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h b/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
index 97d586f..35f1e98 100644
--- a/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
+++ b/modules/platforms/cpp/odbc/include/ignite/odbc/statement.h
@@ -81,14 +81,14 @@ namespace ignite
              *
              * @param ptr Column binding offset pointer.
              */
-            void SetColumnBindOffsetPtr(size_t* ptr);
+            void SetColumnBindOffsetPtr(int* ptr);
 
             /**
              * Get column binding offset pointer.
              *
              * @return Column binding offset pointer.
              */
-            size_t* GetColumnBindOffsetPtr();
+            int* GetColumnBindOffsetPtr();
 
             /**
              * Get number of columns in the result set.
@@ -129,14 +129,14 @@ namespace ignite
              *
              * @param ptr Parameter binding offset pointer.
              */
-            void SetParamBindOffsetPtr(size_t* ptr);
+            void SetParamBindOffsetPtr(int* ptr);
 
             /**
              * Get parameter binding offset pointer.
              *
              * @return Parameter binding offset pointer.
              */
-            size_t* GetParamBindOffsetPtr();
+            int* GetParamBindOffsetPtr();
 
             /**
              * Get value of the column in the result set.
@@ -328,10 +328,34 @@ namespace ignite
              */
             uint16_t* GetRowStatusesPtr();
 
+            /**
+             * Select next parameter data for which is required.
+             *
+             * @param paramPtr Pointer to param id stored here.
+             */
+            void SelectParam(void** paramPtr);
+
+            /**
+             * Puts data for previously selected parameter or column.
+             *
+             * @param data Data.
+             * @param len Data length.
+             */
+            void PutData(void* data, SqlLen len);
+
         private:
             IGNITE_NO_COPY_ASSIGNMENT(Statement);
 
             /**
+             * Bind parameter.
+             *
+             * @param paramIdx Parameter index.
+             * @param param Parameter.
+             * @return Operation result.
+             */
+            SqlResult InternalBindParameter(uint16_t paramIdx, const app::Parameter& param);
+
+            /**
              * Get value of the column in the result set.
              *
              * @param columnIdx Column index.
@@ -488,6 +512,21 @@ namespace ignite
             SqlResult InternalAffectedRows(int64_t& rowCnt);
 
             /**
+             * Select next parameter data for which is required.
+             *
+             * @param paramPtr Pointer to param id stored here.
+             */
+            SqlResult InternalSelectParam(void** paramPtr);
+
+            /**
+             * Puts data for previously selected parameter or column.
+             *
+             * @param data Data.
+             * @param len Data length.
+             */
+            SqlResult InternalPutData(void* data, SqlLen len);
+
+            /**
              * Constructor.
              * Called by friend classes.
              *
@@ -514,12 +553,15 @@ namespace ignite
             uint16_t* rowStatuses;
 
             /** Offset added to pointers to change binding of parameters. */
-            size_t* paramBindOffset;
+            int* paramBindOffset;
             
-            /* Offset added to pointers to change binding of column data. */
-            size_t* columnBindOffset;
+            /** Offset added to pointers to change binding of column data. */
+            int* columnBindOffset;
+
+            /** Index of the parameter, which is currently being set. */
+            uint16_t currentParamIdx;
         };
     }
 }
 
-#endif //_IGNITE_ODBC_STATEMENT
\ No newline at end of file
+#endif //_IGNITE_ODBC_STATEMENT

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/project/vs/module.def
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/project/vs/module.def b/modules/platforms/cpp/odbc/project/vs/module.def
index c94869b..df7bd22 100644
--- a/modules/platforms/cpp/odbc/project/vs/module.def
+++ b/modules/platforms/cpp/odbc/project/vs/module.def
@@ -35,7 +35,6 @@ EXPORTS
 	SQLTables
 	SQLBrowseConnect
 	SQLColumnPrivileges
-	SQLDescribeParam
 	SQLForeignKeys
 	SQLMoreResults
 	SQLNativeSql

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
index 2190c00..1438b0c 100644
--- a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
+++ b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
@@ -36,20 +36,32 @@ namespace ignite
             using ignite::impl::binary::BinaryUtils;
 
             ApplicationDataBuffer::ApplicationDataBuffer() :
-                type(type_traits::IGNITE_ODBC_C_TYPE_UNSUPPORTED), buffer(0), buflen(0), reslen(0), offset(0)
+                type(type_traits::IGNITE_ODBC_C_TYPE_UNSUPPORTED),
+                buffer(0),
+                buflen(0),
+                reslen(0),
+                offset(0)
             {
                 // No-op.
             }
 
             ApplicationDataBuffer::ApplicationDataBuffer(type_traits::IgniteSqlType type, 
-                void* buffer, SqlLen buflen, SqlLen* reslen, size_t** offset) :
-                type(type), buffer(buffer), buflen(buflen), reslen(reslen), offset(offset)
+                void* buffer, SqlLen buflen, SqlLen* reslen, int** offset) :
+                type(type),
+                buffer(buffer),
+                buflen(buflen),
+                reslen(reslen),
+                offset(offset)
             {
                 // No-op.
             }
 
             ApplicationDataBuffer::ApplicationDataBuffer(const ApplicationDataBuffer & other) :
-                type(other.type), buffer(other.buffer), buflen(other.buflen), reslen(other.reslen), offset(other.offset)
+                type(other.type),
+                buffer(other.buffer),
+                buflen(other.buflen),
+                reslen(other.reslen),
+                offset(other.offset)
             {
                 // No-op.
             }
@@ -74,6 +86,10 @@ namespace ignite
             void ApplicationDataBuffer::PutNum(T value)
             {
                 using namespace type_traits;
+
+                SqlLen* resLenPtr = GetResLen();
+                void* dataPtr = GetData();
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
@@ -151,10 +167,10 @@ namespace ignite
 
                     case IGNITE_ODBC_C_TYPE_NUMERIC:
                     {
-                        if (GetData())
+                        if (dataPtr)
                         {
                             SQL_NUMERIC_STRUCT* out =
-                                reinterpret_cast<SQL_NUMERIC_STRUCT*>(GetData());
+                                reinterpret_cast<SQL_NUMERIC_STRUCT*>(dataPtr);
 
                             uint64_t uval = static_cast<uint64_t>(value < 0 ? -value : value);
 
@@ -172,27 +188,26 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_BINARY:
                     case IGNITE_ODBC_C_TYPE_DEFAULT:
                     {
-                        if (GetData())
+                        if (dataPtr)
                         {
                             if (buflen >= sizeof(value))
                             {
-                                memcpy(GetData(), &value, sizeof(value));
+                                memcpy(dataPtr, &value, sizeof(value));
 
-                                if (GetResLen())
-                                    *GetResLen() = sizeof(value);
+                                if (resLenPtr)
+                                    *resLenPtr = sizeof(value);
                             }
                             else
                             {
-                                memcpy(GetData(), &value, static_cast<size_t>(buflen));
+                                memcpy(dataPtr, &value, static_cast<size_t>(buflen));
 
-                                if (GetResLen())
-                                    *GetResLen() = SQL_NO_TOTAL;
+                                if (resLenPtr)
+                                    *resLenPtr = SQL_NO_TOTAL;
                             }
                         }
-                        else if (GetResLen())
-                        {
-                            *GetResLen() = sizeof(value);
-                        }
+                        else if (resLenPtr)
+                            *resLenPtr = sizeof(value);
+
                         break;
                     }
 
@@ -212,8 +227,8 @@ namespace ignite
 
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
             }
@@ -221,9 +236,11 @@ namespace ignite
             template<typename Tbuf, typename Tin>
             void ApplicationDataBuffer::PutNumToNumBuffer(Tin value)
             {
-                if (GetData())
+                void* dataPtr = GetData();
+
+                if (dataPtr)
                 {
-                    Tbuf* out = reinterpret_cast<Tbuf*>(GetData());
+                    Tbuf* out = reinterpret_cast<Tbuf*>(dataPtr);
                     *out = static_cast<Tbuf>(value);
                 }
             }
@@ -257,11 +274,14 @@ namespace ignite
             {
                 SqlLen charSize = static_cast<SqlLen>(sizeof(OutCharT));
 
-                if (GetData())
+                SqlLen* resLenPtr = GetResLen();
+                void* dataPtr = GetData();
+
+                if (dataPtr)
                 {
                     if (buflen >= charSize)
                     {
-                        OutCharT* out = reinterpret_cast<OutCharT*>(GetData());
+                        OutCharT* out = reinterpret_cast<OutCharT*>(dataPtr);
 
                         SqlLen outLen = (buflen / charSize) - 1;
 
@@ -273,38 +293,41 @@ namespace ignite
                         out[toCopy] = 0;
                     }
 
-                    if (GetResLen())
+                    if (resLenPtr)
                     {
                         if (buflen >= static_cast<SqlLen>((value.size() + 1) * charSize))
-                            *GetResLen() = static_cast<SqlLen>(value.size());
+                            *resLenPtr = static_cast<SqlLen>(value.size());
                         else
-                            *GetResLen() = SQL_NO_TOTAL;
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
-                else if (GetResLen())
-                    *GetResLen() = value.size();
+                else if (resLenPtr)
+                    *resLenPtr = value.size();
             }
 
             void ApplicationDataBuffer::PutRawDataToBuffer(void *data, size_t len)
             {
                 SqlLen ilen = static_cast<SqlLen>(len);
 
-                if (GetData())
+                SqlLen* resLenPtr = GetResLen();
+                void* dataPtr = GetData();
+
+                if (dataPtr)
                 {
                     size_t toCopy = static_cast<size_t>(std::min(buflen, ilen));
 
-                    memcpy(GetData(), data, toCopy);
+                    memcpy(dataPtr, data, toCopy);
 
-                    if (GetResLen())
+                    if (resLenPtr)
                     {
                         if (buflen >= ilen)
-                            *GetResLen() = ilen;
+                            *resLenPtr = ilen;
                         else
-                            *GetResLen() = SQL_NO_TOTAL;
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
-                else if (GetResLen())
-                    *GetResLen() = ilen;
+                else if (resLenPtr)
+                    *resLenPtr = ilen;
             }
 
             void ApplicationDataBuffer::PutInt8(int8_t value)
@@ -411,8 +434,10 @@ namespace ignite
 
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        SqlLen* resLenPtr = GetResLen();
+
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
 
@@ -456,8 +481,10 @@ namespace ignite
 
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        SqlLen* resLenPtr = GetResLen();
+
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
             }
@@ -524,8 +551,10 @@ namespace ignite
 
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        SqlLen* resLenPtr = GetResLen();
+
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
 
@@ -534,13 +563,16 @@ namespace ignite
 
             void ApplicationDataBuffer::PutNull()
             {
-                if (GetResLen())
-                    *GetResLen() = SQL_NULL_DATA;
+                SqlLen* resLenPtr = GetResLen();
+
+                if (resLenPtr)
+                    *resLenPtr = SQL_NULL_DATA;
             }
 
             void ApplicationDataBuffer::PutDecimal(const common::Decimal& value)
             {
                 using namespace type_traits;
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
@@ -612,8 +644,10 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_BINARY:
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        SqlLen* resLenPtr = GetResLen();
+
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
             }
@@ -626,28 +660,31 @@ namespace ignite
 
                 BinaryUtils::DateToCTm(value, tmTime);
 
+                SqlLen* resLenPtr = GetResLen();
+                void* dataPtr = GetData();
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
-                        char* buffer = reinterpret_cast<char*>(GetData());
+                        char* buffer = reinterpret_cast<char*>(dataPtr);
 
                         if (buffer)
                         {
                             strftime(buffer, GetSize(), "%Y-%m-%d", &tmTime);
 
-                            if (GetResLen())
-                                *GetResLen() = strlen(buffer);
+                            if (resLenPtr)
+                                *resLenPtr = strlen(buffer);
                         }
-                        else if (GetResLen())
-                            *GetResLen() = sizeof("HHHH-MM-DD") - 1;
+                        else if (resLenPtr)
+                            *resLenPtr = sizeof("HHHH-MM-DD") - 1;
 
                         break;
                     }
 
                     case IGNITE_ODBC_C_TYPE_WCHAR:
                     {
-                        SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(GetData());
+                        SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(dataPtr);
 
                         if (buffer)
                         {
@@ -662,18 +699,18 @@ namespace ignite
 
                             buffer[toCopy] = 0;
 
-                            if (GetResLen())
-                                *GetResLen() = toCopy;
+                            if (resLenPtr)
+                                *resLenPtr = toCopy;
                         }
-                        else if (GetResLen())
-                            *GetResLen() = sizeof("HHHH-MM-DD") - 1;
+                        else if (resLenPtr)
+                            *resLenPtr = sizeof("HHHH-MM-DD") - 1;
 
                         break;
                     }
 
                     case IGNITE_ODBC_C_TYPE_TDATE:
                     {
-                        SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(GetData());
+                        SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(dataPtr);
 
                         buffer->year = tmTime.tm_year + 1900;
                         buffer->month = tmTime.tm_mon + 1;
@@ -684,7 +721,7 @@ namespace ignite
 
                     case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
                     {
-                        SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(GetData());
+                        SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(dataPtr);
 
                         buffer->year = tmTime.tm_year + 1900;
                         buffer->month = tmTime.tm_mon + 1;
@@ -700,11 +737,11 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_BINARY:
                     case IGNITE_ODBC_C_TYPE_DEFAULT:
                     {
-                        if (GetData())
-                            memcpy(GetData(), &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
+                        if (dataPtr)
+                            memcpy(dataPtr, &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
 
-                        if (GetResLen())
-                            *GetResLen() = sizeof(value);
+                        if (resLenPtr)
+                            *resLenPtr = sizeof(value);
 
                         break;
                     }
@@ -723,8 +760,8 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_NUMERIC:
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
             }
@@ -737,28 +774,31 @@ namespace ignite
 
                 BinaryUtils::TimestampToCTm(value, tmTime);
 
+                SqlLen* resLenPtr = GetResLen();
+                void* dataPtr = GetData();
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
-                        char* buffer = reinterpret_cast<char*>(GetData());
+                        char* buffer = reinterpret_cast<char*>(dataPtr);
 
                         if (buffer)
                         {
                             strftime(buffer, GetSize(), "%Y-%m-%d %H:%M:%S", &tmTime);
 
-                            if (GetResLen())
-                                *GetResLen() = strlen(buffer);
+                            if (resLenPtr)
+                                *resLenPtr = strlen(buffer);
                         }
-                        else if (GetResLen())
-                            *GetResLen() = sizeof("HHHH-MM-DD HH:MM:SS") - 1;
+                        else if (resLenPtr)
+                            *resLenPtr = sizeof("HHHH-MM-DD HH:MM:SS") - 1;
 
                         break;
                     }
 
                     case IGNITE_ODBC_C_TYPE_WCHAR:
                     {
-                        SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(GetData());
+                        SQLWCHAR* buffer = reinterpret_cast<SQLWCHAR*>(dataPtr);
 
                         if (buffer)
                         {
@@ -773,18 +813,18 @@ namespace ignite
 
                             buffer[toCopy] = 0;
 
-                            if (GetResLen())
-                                *GetResLen() = toCopy;
+                            if (resLenPtr)
+                                *resLenPtr = toCopy;
                         }
-                        else if (GetResLen())
-                            *GetResLen() = sizeof("HHHH-MM-DD HH:MM:SS") - 1;
+                        else if (resLenPtr)
+                            *resLenPtr = sizeof("HHHH-MM-DD HH:MM:SS") - 1;
 
                         break;
                     }
 
                     case IGNITE_ODBC_C_TYPE_TDATE:
                     {
-                        SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(GetData());
+                        SQL_DATE_STRUCT* buffer = reinterpret_cast<SQL_DATE_STRUCT*>(dataPtr);
 
                         buffer->year = tmTime.tm_year + 1900;
                         buffer->month = tmTime.tm_mon + 1;
@@ -795,7 +835,7 @@ namespace ignite
 
                     case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
                     {
-                        SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(GetData());
+                        SQL_TIMESTAMP_STRUCT* buffer = reinterpret_cast<SQL_TIMESTAMP_STRUCT*>(dataPtr);
 
                         buffer->year = tmTime.tm_year + 1900;
                         buffer->month = tmTime.tm_mon + 1;
@@ -811,11 +851,11 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_BINARY:
                     case IGNITE_ODBC_C_TYPE_DEFAULT:
                     {
-                        if (GetData())
-                            memcpy(GetData(), &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
+                        if (dataPtr)
+                            memcpy(dataPtr, &value, std::min(static_cast<size_t>(buflen), sizeof(value)));
 
-                        if (GetResLen())
-                            *GetResLen() = sizeof(value);
+                        if (resLenPtr)
+                            *resLenPtr = sizeof(value);
 
                         break;
                     }
@@ -834,8 +874,8 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_NUMERIC:
                     default:
                     {
-                        if (GetResLen())
-                            *GetResLen() = SQL_NO_TOTAL;
+                        if (resLenPtr)
+                            *resLenPtr = SQL_NO_TOTAL;
                     }
                 }
             }
@@ -849,8 +889,13 @@ namespace ignite
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
                         res.assign(reinterpret_cast<const char*>(GetData()),
-                                   std::min(maxLen, static_cast<size_t>(buflen)));
+                                   std::min(maxLen, paramLen));
                         break;
                     }
 
@@ -953,7 +998,12 @@ namespace ignite
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
-                        std::string str(reinterpret_cast<const char*>(GetData()), static_cast<size_t>(buflen));
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
+                        std::string str(reinterpret_cast<const char*>(GetData()), paramLen);
 
                         std::stringstream converter;
 
@@ -1014,13 +1064,18 @@ namespace ignite
             {
                 using namespace type_traits;
 
-                T res = 0;
+                T res = T();
 
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
-                        std::string str = GetString(static_cast<size_t>(buflen));
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
+                        std::string str = GetString(paramLen);
 
                         std::stringstream converter;
 
@@ -1158,9 +1213,13 @@ namespace ignite
 
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
                         std::string str = utility::SqlStringToString(
-                            reinterpret_cast<const unsigned char*>(GetData()),
-                            static_cast<int32_t>(GetSize()));
+                            reinterpret_cast<const unsigned char*>(GetData()), static_cast<int32_t>(paramLen));
 
                         sscanf(str.c_str(), "%d-%d-%d %d:%d:%d", &tmTime.tm_year, &tmTime.tm_mon,
                             &tmTime.tm_mday, &tmTime.tm_hour, &tmTime.tm_min, &tmTime.tm_sec);
@@ -1217,9 +1276,13 @@ namespace ignite
 
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
                         std::string str = utility::SqlStringToString(
-                            reinterpret_cast<const unsigned char*>(GetData()),
-                            static_cast<int32_t>(GetSize()));
+                            reinterpret_cast<const unsigned char*>(GetData()), static_cast<int32_t>(paramLen));
 
                         sscanf(str.c_str(), "%d-%d-%d %d:%d:%d", &tmTime.tm_year, &tmTime.tm_mon,
                             &tmTime.tm_mday, &tmTime.tm_hour, &tmTime.tm_min, &tmTime.tm_sec);
@@ -1245,7 +1308,12 @@ namespace ignite
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
                     {
-                        std::string str = GetString(static_cast<size_t>(buflen));
+                        size_t paramLen = GetInputSize();
+
+                        if (!paramLen)
+                            break;
+
+                        std::string str = GetString(paramLen);
 
                         std::stringstream converter;
 
@@ -1315,6 +1383,101 @@ namespace ignite
 
                 return utility::GetPointerWithOffset(ptr, **offset);
             }
+
+            bool ApplicationDataBuffer::IsDataAtExec() const
+            {
+                const SqlLen* resLenPtr = GetResLen();
+
+                if (!resLenPtr)
+                    return false;
+
+                int32_t ilen = static_cast<int32_t>(*resLenPtr);
+
+                return ilen <= SQL_LEN_DATA_AT_EXEC_OFFSET || ilen == SQL_DATA_AT_EXEC;
+            }
+
+            size_t ApplicationDataBuffer::GetDataAtExecSize() const
+            {
+                using namespace type_traits;
+
+                switch (type)
+                {
+                    case IGNITE_ODBC_C_TYPE_WCHAR:
+                    case IGNITE_ODBC_C_TYPE_CHAR:
+                    case IGNITE_ODBC_C_TYPE_BINARY:
+                    {
+                        const SqlLen* resLenPtr = GetResLen();
+
+                        if (!resLenPtr)
+                            return 0;
+
+                        int32_t ilen = static_cast<int32_t>(*resLenPtr);
+
+                        if (ilen <= SQL_LEN_DATA_AT_EXEC_OFFSET)
+                            ilen = static_cast<size_t>(SQL_LEN_DATA_AT_EXEC(ilen));
+                        else
+                            ilen = 0;
+
+                        if (type == IGNITE_ODBC_C_TYPE_WCHAR)
+                            ilen *= 2;
+
+                        return ilen;
+                    }
+
+                    case IGNITE_ODBC_C_TYPE_SIGNED_SHORT:
+                    case IGNITE_ODBC_C_TYPE_UNSIGNED_SHORT:
+                        return sizeof(short);
+
+                    case IGNITE_ODBC_C_TYPE_SIGNED_LONG:
+                    case IGNITE_ODBC_C_TYPE_UNSIGNED_LONG:
+                        return sizeof(long);
+
+                    case IGNITE_ODBC_C_TYPE_FLOAT:
+                        return sizeof(float);
+
+                    case IGNITE_ODBC_C_TYPE_DOUBLE:
+                        return sizeof(double);
+
+                    case IGNITE_ODBC_C_TYPE_BIT:
+                    case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
+                    case IGNITE_ODBC_C_TYPE_UNSIGNED_TINYINT:
+                        return sizeof(char);
+
+                    case IGNITE_ODBC_C_TYPE_SIGNED_BIGINT:
+                    case IGNITE_ODBC_C_TYPE_UNSIGNED_BIGINT:
+                        return sizeof(SQLBIGINT);
+
+                    case IGNITE_ODBC_C_TYPE_TDATE:
+                        return sizeof(SQL_DATE_STRUCT);
+
+                    case IGNITE_ODBC_C_TYPE_TTIME:
+                        return sizeof(SQL_TIME_STRUCT);
+
+                    case IGNITE_ODBC_C_TYPE_TTIMESTAMP:
+                        return sizeof(SQL_TIMESTAMP_STRUCT);
+
+                    case IGNITE_ODBC_C_TYPE_NUMERIC:
+                        return sizeof(SQL_NUMERIC_STRUCT);
+
+                    case IGNITE_ODBC_C_TYPE_GUID:
+                        return sizeof(SQLGUID);
+
+                    case IGNITE_ODBC_C_TYPE_DEFAULT:
+                    case IGNITE_ODBC_C_TYPE_UNSUPPORTED:
+                    default:
+                        break;
+                }
+
+                return 0;
+            }
+
+            size_t ApplicationDataBuffer::GetInputSize() const
+            {
+                if (!IsDataAtExec())
+                    return static_cast<size_t>(GetSize());
+
+                return GetDataAtExecSize();
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/app/parameter.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/parameter.cpp b/modules/platforms/cpp/odbc/src/app/parameter.cpp
index 3e14642..d70ef6a 100644
--- a/modules/platforms/cpp/odbc/src/app/parameter.cpp
+++ b/modules/platforms/cpp/odbc/src/app/parameter.cpp
@@ -33,7 +33,9 @@ namespace ignite
                 buffer(),
                 sqlType(),
                 columnSize(),
-                decDigits()
+                decDigits(),
+                nullData(false),
+                storedData()
             {
                 // No-op.
             }
@@ -43,7 +45,9 @@ namespace ignite
                 buffer(buffer),
                 sqlType(sqlType),
                 columnSize(columnSize),
-                decDigits(decDigits)
+                decDigits(decDigits),
+                nullData(false),
+                storedData()
             {
                 // No-op.
             }
@@ -52,7 +56,9 @@ namespace ignite
                 buffer(other.buffer),
                 sqlType(other.sqlType),
                 columnSize(other.columnSize),
-                decDigits(other.decDigits)
+                decDigits(other.decDigits),
+                nullData(other.nullData),
+                storedData(other.storedData)
             {
                 // No-op.
             }
@@ -74,67 +80,85 @@ namespace ignite
 
             void Parameter::Write(ignite::impl::binary::BinaryWriterImpl& writer) const
             {
+                if (buffer.GetInputSize() == SQL_NULL_DATA)
+                {
+                    writer.WriteNull();
+
+                    return;
+                }
+
+                // Buffer to use to get data.
+                ApplicationDataBuffer buf(buffer);
+
+                SqlLen storedDataLen = static_cast<SqlLen>(storedData.size());
+
+                if (buffer.IsDataAtExec())
+                {
+                    buf = ApplicationDataBuffer(buffer.GetType(),
+                        const_cast<int8_t*>(&storedData[0]), storedDataLen, &storedDataLen);
+                }
+
                 switch (sqlType)
                 {
                     case SQL_CHAR:
                     case SQL_VARCHAR:
                     case SQL_LONGVARCHAR:
                     {
-                        utility::WriteString(writer, buffer.GetString(columnSize));
+                        utility::WriteString(writer, buf.GetString(columnSize));
                         break;
                     }
 
                     case SQL_SMALLINT:
                     {
-                        writer.WriteInt16(buffer.GetInt16());
+                        writer.WriteObject<int16_t>(buf.GetInt16());
                         break;
                     }
 
                     case SQL_INTEGER:
                     {
-                        writer.WriteInt32(buffer.GetInt32());
+                        writer.WriteObject<int32_t>(buf.GetInt32());
                         break;
                     }
 
                     case SQL_FLOAT:
                     {
-                        writer.WriteFloat(buffer.GetFloat());
+                        writer.WriteObject<float>(buf.GetFloat());
                         break;
                     }
 
                     case SQL_DOUBLE:
                     {
-                        writer.WriteDouble(buffer.GetDouble());
+                        writer.WriteObject<double>(buf.GetDouble());
                         break;
                     }
 
                     case SQL_TINYINT:
                     {
-                        writer.WriteInt8(buffer.GetInt8());
+                        writer.WriteObject<int8_t>(buf.GetInt8());
                         break;
                     }
 
                     case SQL_BIT:
                     {
-                        writer.WriteBool(buffer.GetInt8() != 0);
+                        writer.WriteObject<bool>(buf.GetInt8() != 0);
                         break;
                     }
 
                     case SQL_BIGINT:
                     {
-                        writer.WriteInt64(buffer.GetInt64());
+                        writer.WriteObject<int64_t>(buf.GetInt64());
                         break;
                     }
 
                     case SQL_DATE:
                     {
-                        writer.WriteDate(buffer.GetDate());
+                        writer.WriteDate(buf.GetDate());
                         break;
                     }
 
                     case SQL_TIMESTAMP:
                     {
-                        writer.WriteTimestamp(buffer.GetTimestamp());
+                        writer.WriteTimestamp(buf.GetTimestamp());
                         break;
                     }
 
@@ -142,14 +166,23 @@ namespace ignite
                     case SQL_VARBINARY:
                     case SQL_LONGVARBINARY:
                     {
-                        writer.WriteInt8Array(reinterpret_cast<const int8_t*>(buffer.GetData()),
-                                              static_cast<int32_t>(buffer.GetSize()));
+                        const ApplicationDataBuffer& constRef = buf;
+
+                        const SqlLen* resLenPtr = constRef.GetResLen();
+
+                        if (!resLenPtr)
+                            break;
+
+                        int32_t paramLen = static_cast<int32_t>(*resLenPtr);
+
+                        writer.WriteInt8Array(reinterpret_cast<const int8_t*>(constRef.GetData()), paramLen);
+
                         break;
                     }
 
                     case SQL_GUID:
                     {
-                        writer.WriteGuid(buffer.GetGuid());
+                        writer.WriteGuid(buf.GetGuid());
 
                         break;
                     }
@@ -157,7 +190,7 @@ namespace ignite
                     case SQL_DECIMAL:
                     {
                         common::Decimal dec;
-                        buffer.GetDecimal(dec);
+                        buf.GetDecimal(dec);
 
                         utility::WriteDecimal(writer, dec);
 
@@ -169,10 +202,67 @@ namespace ignite
                 }
             }
 
-            ApplicationDataBuffer & Parameter::GetBuffer()
+            ApplicationDataBuffer& Parameter::GetBuffer()
             {
                 return buffer;
             }
+
+            void Parameter::ResetStoredData()
+            {
+                storedData.clear();
+
+                if (buffer.IsDataAtExec())
+                    storedData.reserve(buffer.GetDataAtExecSize());
+            }
+
+            bool Parameter::IsDataReady() const
+            {
+                return !buffer.IsDataAtExec() ||
+                       storedData.size() == buffer.GetDataAtExecSize();
+            }
+
+            void Parameter::PutData(void* data, SqlLen len)
+            {
+                if (len == SQL_DEFAULT_PARAM)
+                    return;
+
+                if (len == SQL_NULL_DATA)
+                {
+                    nullData = true;
+
+                    return;
+                }
+
+                if (buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_CHAR ||
+                    buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_BINARY)
+                {
+                    SqlLen slen = len;
+
+                    if (buffer.GetType() == type_traits::IGNITE_ODBC_C_TYPE_CHAR && slen == SQL_NTSL)
+                    {
+                        const char* str = reinterpret_cast<char*>(data);
+
+                        slen = strlen(str);
+                    }
+
+                    if (slen <= 0)
+                        return;
+
+                    size_t beginPos = storedData.size();
+
+                    storedData.resize(storedData.size() + static_cast<size_t>(slen));
+
+                    memcpy(&storedData[beginPos], data, static_cast<size_t>(slen));
+
+                    return;
+                }
+
+                size_t dataSize = buffer.GetDataAtExecSize();
+
+                storedData.resize(dataSize);
+
+                memcpy(&storedData[0], data, dataSize);
+            }
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/common_types.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/common_types.cpp b/modules/platforms/cpp/odbc/src/common_types.cpp
index 276d9fd..36d11c2 100644
--- a/modules/platforms/cpp/odbc/src/common_types.cpp
+++ b/modules/platforms/cpp/odbc/src/common_types.cpp
@@ -37,6 +37,9 @@ namespace ignite
                 case SQL_RESULT_NO_DATA:
                     return SQL_NO_DATA;
 
+                case SQL_RESULT_NEED_DATA:
+                    return SQL_NEED_DATA;
+
                 case SQL_RESULT_ERROR:
                 default:
                     return SQL_ERROR;

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/config/configuration.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/config/configuration.cpp b/modules/platforms/cpp/odbc/src/config/configuration.cpp
index 74ccaaf..cc2cc5d 100644
--- a/modules/platforms/cpp/odbc/src/config/configuration.cpp
+++ b/modules/platforms/cpp/odbc/src/config/configuration.cpp
@@ -141,6 +141,33 @@ namespace ignite
                 }
             }
 
+            void Configuration::SetTcpPort(uint16_t port)
+            {
+                arguments[Key::port] = common::LexicalCast<std::string>(port);
+
+                ArgumentMap::const_iterator it = arguments.find(Key::address);
+
+                if (it == arguments.end())
+                    endPoint.port = port;
+            }
+
+            void Configuration::SetHost(const std::string& server)
+            {
+                arguments[Key::server] = server;
+
+                ArgumentMap::const_iterator it = arguments.find(Key::address);
+
+                if (it == arguments.end())
+                    endPoint.host = server;
+            }
+
+            void Configuration::SetAddress(const std::string& address)
+            {
+                arguments[Key::address] = address;
+
+                ParseAddress(address, endPoint);
+            }
+
             ProtocolVersion Configuration::GetProtocolVersion() const
             {
                 ArgumentMap::const_iterator it = arguments.find(Key::protocolVersion);

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/config/connection_info.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/config/connection_info.cpp b/modules/platforms/cpp/odbc/src/config/connection_info.cpp
index ee2c22b..341ab7f 100644
--- a/modules/platforms/cpp/odbc/src/config/connection_info.cpp
+++ b/modules/platforms/cpp/odbc/src/config/connection_info.cpp
@@ -62,7 +62,8 @@ namespace ignite
                     DBG_STR_CASE(SQL_CATALOG_TERM);
                     DBG_STR_CASE(SQL_TABLE_TERM);
                     DBG_STR_CASE(SQL_SCHEMA_TERM);
-                    DBG_STR_CASE(SQL_ASYNC_DBC_FUNCTIONS);
+                    DBG_STR_CASE(SQL_NEED_LONG_DATA_LEN);
+//                    DBG_STR_CASE(SQL_ASYNC_DBC_FUNCTIONS);
                     DBG_STR_CASE(SQL_ASYNC_NOTIFICATION);
                     DBG_STR_CASE(SQL_GETDATA_EXTENSIONS);
                     DBG_STR_CASE(SQL_ODBC_INTERFACE_CONFORMANCE);
@@ -92,6 +93,8 @@ namespace ignite
                     DBG_STR_CASE(SQL_SQL92_PREDICATES);
                     DBG_STR_CASE(SQL_SQL92_RELATIONAL_JOIN_OPERATORS);
                     DBG_STR_CASE(SQL_SQL92_VALUE_EXPRESSIONS);
+                    DBG_STR_CASE(SQL_STATIC_CURSOR_ATTRIBUTES1);
+                    DBG_STR_CASE(SQL_STATIC_CURSOR_ATTRIBUTES2);
                 default: 
                     break;
                 }
@@ -104,7 +107,7 @@ namespace ignite
             ConnectionInfo::ConnectionInfo() : strParams(), intParams(),
                 shortParams()
             {
-                //========================= String Params =========================
+                //======================= String Params =======================
                 // Driver name.
                 strParams[SQL_DRIVER_NAME] = "Apache Ignite";
                 strParams[SQL_DBMS_NAME]   = "Apache Ignite";
@@ -170,8 +173,16 @@ namespace ignite
                 strParams[SQL_SCHEMA_TERM] = "schema";
 #endif // SQL_SCHEMA_TERM
 
+#ifdef SQL_NEED_LONG_DATA_LEN
+                // A character string: "Y" if the data source needs the length
+                // of a long data value (the data type is SQL_LONGVARCHAR,
+                // SQL_LONGVARBINARY) before that value is sent to the data
+                // source, "N" if it does not.
+                strParams[SQL_NEED_LONG_DATA_LEN ] = "Y";
+#endif // SQL_NEED_LONG_DATA_LEN
+
 #ifdef SQL_ASYNC_DBC_FUNCTIONS
-                //======================== Integer Params =========================
+                //====================== Integer Params =======================
                 // Indicates if the driver can execute functions asynchronously
                 // on the connection handle.
                 // SQL_ASYNC_DBC_CAPABLE = The driver can execute connection
@@ -342,7 +353,23 @@ namespace ignite
                     SQL_SRJO_NATURAL_JOIN | SQL_SRJO_INTERSECT_JOIN | SQL_SRJO_UNION_JOIN;
 #endif // SQL_SQL92_RELATIONAL_JOIN_OPERATORS
 
-                //========================= Short Params ==========================
+#ifdef SQL_STATIC_CURSOR_ATTRIBUTES1
+                // Bitmask that describes the attributes of a static cursor that
+                // are supported by the driver. This bitmask contains the first
+                // subset of attributes; for the second subset, see
+                // SQL_STATIC_CURSOR_ATTRIBUTES2.
+                intParams[SQL_STATIC_CURSOR_ATTRIBUTES1] = SQL_CA1_NEXT;
+#endif //SQL_STATIC_CURSOR_ATTRIBUTES1
+
+#ifdef SQL_STATIC_CURSOR_ATTRIBUTES2
+                // Bitmask that describes the attributes of a static cursor that
+                // are supported by the driver. This bitmask contains the second
+                // subset of attributes; for the first subset, see
+                // SQL_STATIC_CURSOR_ATTRIBUTES1.
+                intParams[SQL_STATIC_CURSOR_ATTRIBUTES2] = 0;
+#endif //SQL_STATIC_CURSOR_ATTRIBUTES2
+
+                //======================= Short Params ========================
 #ifdef SQL_MAX_CONCURRENT_ACTIVITIES
                 // The maximum number of active statements that the driver can
                 // support for a connection. Zero mean no limit.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/connection.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/connection.cpp b/modules/platforms/cpp/odbc/src/connection.cpp
index cffecdf..cbbb2f7 100644
--- a/modules/platforms/cpp/odbc/src/connection.cpp
+++ b/modules/platforms/cpp/odbc/src/connection.cpp
@@ -52,7 +52,7 @@ namespace ignite
         {
             // No-op.
         }
-        
+
         const config::ConnectionInfo& Connection::GetInfo() const
         {
             // Connection info is constant and the same for all connections now.

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
index 8553ee4..1b654d2 100644
--- a/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
+++ b/modules/platforms/cpp/odbc/src/diagnostic/diagnostic_record.cpp
@@ -40,9 +40,15 @@ namespace
     /** SQL state 01S01 constant. */
     const std::string STATE_01S01 = "01S01";
 
+    /** SQL state 22026 constant. */
+    const std::string STATE_22026 = "22026";
+
     /** SQL state 24000 constant. */
     const std::string STATE_24000 = "24000";
 
+    /** SQL state 07009 constant. */
+    const std::string STATE_07009 = "07009";
+
     /** SQL state 08001 constant. */
     const std::string STATE_08001 = "08001";
 
@@ -58,6 +64,9 @@ namespace
     /** SQL state HY001 constant. */
     const std::string STATE_HY001 = "HY001";
 
+    /** SQL state HY009 constant. */
+    const std::string STATE_HY009 = "HY009";
+
     /** SQL state HY010 constant. */
     const std::string STATE_HY010 = "HY010";
 
@@ -199,9 +208,15 @@ namespace ignite
                     case SQL_STATE_01S01_ERROR_IN_ROW:
                         return STATE_01S01;
 
+                    case SQL_STATE_22026_DATA_LENGTH_MISMATCH:
+                        return STATE_22026;
+
                     case SQL_STATE_24000_INVALID_CURSOR_STATE:
                         return STATE_24000;
 
+                    case SQL_STATE_07009_INVALID_DESCRIPTOR_INDEX:
+                        return STATE_07009;
+
                     case SQL_STATE_08001_CANNOT_CONNECT:
                         return STATE_08001;
 
@@ -217,6 +232,9 @@ namespace ignite
                     case SQL_STATE_HY001_MEMORY_ALLOCATION:
                         return STATE_HY001;
 
+                    case SQL_STATE_HY009_INVALID_USE_OF_NULL_POINTER:
+                        return STATE_HY009;
+
                     case SQL_STATE_HY010_SEQUENCE_ERROR:
                         return STATE_HY010;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/a4a933eb/modules/platforms/cpp/odbc/src/entry_points.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/entry_points.cpp b/modules/platforms/cpp/odbc/src/entry_points.cpp
index c3d24bb..08016cc 100644
--- a/modules/platforms/cpp/odbc/src/entry_points.cpp
+++ b/modules/platforms/cpp/odbc/src/entry_points.cpp
@@ -399,6 +399,19 @@ SQLRETURN SQL_API SQLSpecialColumns(SQLHSTMT    stmt,
         tableNameLen, scope, nullable);
 }
 
+SQLRETURN SQL_API SQLParamData(SQLHSTMT    stmt,
+                               SQLPOINTER* value)
+{
+    return ignite::SQLParamData(stmt, value);
+}
+
+SQLRETURN SQL_API SQLPutData(SQLHSTMT     stmt,
+                             SQLPOINTER   data,
+                             SQLLEN       strLengthOrIndicator)
+{
+    return ignite::SQLPutData(stmt, data, strLengthOrIndicator);
+}
+
 //
 // ==== Not implemented ====
 //
@@ -467,21 +480,6 @@ SQLRETURN SQL_API SQLGetStmtOption(SQLHSTMT     stmt,
     return SQL_SUCCESS;
 }
 
-SQLRETURN SQL_API SQLParamData(SQLHSTMT    stmt,
-                               SQLPOINTER* value)
-{
-    LOG_MSG("SQLParamData called\n");
-    return SQL_SUCCESS;
-}
-
-SQLRETURN SQL_API SQLPutData(SQLHSTMT     stmt,
-                             SQLPOINTER   data,
-                             SQLLEN       strLengthOrIndicator)
-{
-    LOG_MSG("SQLPutData called\n");
-    return SQL_SUCCESS;
-}
-
 SQLRETURN SQL_API SQLSetConnectOption(SQLHDBC       conn,
                                       SQLUSMALLINT  option,
                                       SQLULEN       value)
@@ -665,6 +663,7 @@ SQLRETURN SQL_API SQLColumnPrivileges(SQLHSTMT      stmt,
     return SQL_SUCCESS;
 }
 
+/*
 SQLRETURN SQL_API SQLDescribeParam(SQLHSTMT     stmt,
                                    SQLUSMALLINT paramNum,
                                    SQLSMALLINT* dataType,
@@ -675,6 +674,7 @@ SQLRETURN SQL_API SQLDescribeParam(SQLHSTMT     stmt,
     LOG_MSG("SQLDescribeParam called\n");
     return SQL_SUCCESS;
 }
+*/
 
 SQLRETURN SQL_API SQLParamOptions(SQLHSTMT  stmt,
                                   SQLULEN   paramSetSize,


Mime
View raw message