Reputation: 384
I have installed vectorwise on Centos 5.5 on an intel 3.3 westmere machine.
I can successfully run a SQL query from my TABLE test_table in the bash shell
**[ingres@dataserv tick]$ sql tick
INGRES TERMINAL MONITOR Copyright 2009 Ingres Corporation
Ingres VectorWise Linux Version VW 1.0.0 (a64.lnx/114)NPTL login
Mon Apr 25 19:42:46 2011
Executing . . .
┌─────────────┬─────────────┐
│a │b │
├─────────────┼─────────────┤
│ 1│ 2│
└─────────────┴─────────────┘
(1 row) continue**
this a very simple table.
I would like to get this query result in c++ into an array using the ODBC interface
I was thinking of using http://simpledb.sourceforge.net/ for this but I believe I have failed to properly configure my machine.
Does anyone have an explicit example c++ w build path/includes of how to get this same query result and the setup of the machine required to do so?
Thanks
Upvotes: 0
Views: 439
Reputation: 11
The complete.cpp example provided in the Simple DB site (http://simpledb.sourceforge.net ) works OK for me, I modified the example to use your table and column names and adjusted the actions (all columns are character!!).
I used the Ingres ODBC driver (installed from either the Enterprise or Community release of Ingres Database for Windows) and configured an Ingres VNODE (configured using the Ingres Network Utility) to point to my database.
The ODBC datasource was configured using the ODBC Data Source Administrator.
The VC++ was configured to generate a '.exe' file that could be run.
When I compiled the application I used the x64 version of the program as I am using Windows 2007x64 and the Ingres 10.0.0 release for Windows64.
Output (2 columns in my table)
Col1: a Col2: b
Col1: 1 Col2: 2
Col1: a Col2: b
Some math 25 b adfad
Col1: 1 Col2: 2
Some math 25 2 adfad
Helpfull links network-management-utility
Configuring an ODBC connection - Windows
Upvotes: 1