RE: C++ connect problems
Posted in 2000
Milos, I use the following and do not have problems connecting: /******************************* // Make a connection using defaults ITConnection conn; ITDBInfo dbdefault; dbdefault.SetDatabase("superstores_demo"); conn.Open(dbdefault); ****************************/ Look at ITDBInfo additional details. HTH Tino > -----Original Message----- > From: owner-informix-list@iiug.iiug.org > [mailto:owner-informix-list@iiug.iiug.org]On Behalf Of Milos Prudek > Sent: Tuesday, July 25, 2000 5:01 AM > To: informix-list@iiug.org > Subject: C++ connect problems > > > A very simple example compiles but fails to connect: > > > ---------------------------- cut ---------------------- > #include <iostream.h> > #include <it.h> > #include <string.h> > > int main(int argc, char *argv[]) > { > > ITConnection conn; //definuje objekt pro tento connection > ITDBInfo > amis("bv_ids_tcp","someuser","hp.domain.foo","somepassword"); > > if ( !conn.Open(amis) ) > { > cout << "Failed to connect to the database!" << endl; > return -1; > }; > } > ---------------------------- cut ----------------------- > > My ESQL/C programs connect fine... I believe it's something about Object > Interface that I use improperly... > > -- > Milos Prudek