Re: C++ strings and host variables
Posted in 2000
No, not the way you are trying to do it. The key here is that you are compiling with ESQL/C not ESQL/C++ (no such animal). See the C++ interface that is delivered with the SDK for hints at how to use such features. Basically host variables can ONLY be SQL types as defined in $INFORMIXDIR/incl/esql/sqltypes.h. Art S. Kagel Milos Prudek wrote: > > Is there a way to use strings as host variables? The example below does > not compile under ESQL/C. The underlying C++ compiler is g++ (GNU gcc). > > ------------------------ cut --------------------- > #include <stdio.h> > #include <string> > #include <iostream> > using namespace std; > > int main() > { > EXEC SQL BEGIN DECLARE SECTION; > string heslo; > EXEC SQL END DECLARE SECTION; > > heslo = "heslo"; > } > -----------------------cut ----------------------- > > -- > Milos Prudek