Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.