SOCI/soci — pull request #103 by mloskot (2013-03-15 00:12:24+00:00)
Title: Fix int and long mismatch for vector in ODBC

## Analysis

This is attempt to investigate and solve problems with failing **ODBC** tests after Travis CI switched to Linux VMs from 32-bit to **64-bit** (see Travis CI [build 231](https://travis-ci.org/SOCI/soci/builds/5397230) for details).

Apparently, there is mismatch of C++ types ```vector``` and ```vector``` with ```use()``` and ```into()```.

ODBC backend relies on C++ ```sizeof``` and casting, so mixing 4-byte int with 8-byte long on Linux 64-bit is asking for troubles. AFAIK, ODBC C type ```SQL_C_SLONG``` is derived from ```SQL_INTEGER``` which is 4 bytes long. So, defining 8-byte long output with ```into()``` was corrupting data in memory.

## Calling for review

This commit *may be incomplete* and serves purpose of illustration of the problem, needs to be reviewed and improved if needed. As the ```common-tests.h``` have been changed, it is necessary to verify those changes against other backends as well.

------------------------------
(Problems of this sort prove that sorting out strong requirements regarding [C++ integer type support](https://github.com/SOCI/soci/wiki/RFC1) is a must. Let's do it in SOCI 4.0.0!)