I'm having difficulty with an ESQL/C program connecting to a database on the
local machine. [When I run the program on a Solaris box, it connects to the
server on the Solaris box OK, but fails to retrieve the BLOB successfully.]
The Informix 'Database Explorer' application has no trouble seeing the local
database.
The error code is -25596, with the helpful text of "The INFORMIXSERVER value
is not listed in the sqlhosts file or the Registry."
The code in the .ec file [and the error_check() function] is copied from one
of the Informix ESQL/C example programs [blobload.ec].
<excerpt begins>
int main(int argc, char ** argv){
EXEC SQL BEGIN DECLARE SECTION;
char str_spec[128];
char dbname[30];
EXEC SQL END DECLARE SECTION;
int rc;
char * database;
char * table;
char * key;
char * buffer;
/*connect to database*/
strcpy(dbname,"testblob");
printf("\\nConnecting to %s",dbname);
EXEC SQL connect to :dbname;
error_check("database statement");
<Excerpt ends>
I've checked the registry values, and they seem to correspond to the ones
specified in "The sqlhosts File or Registry" [page 4-27 of the Dynamic Server
7.3 Administrator's Guide].
One problem may be the lenght of the server's name. I recall that Informix has
some short arbitary length restrictions on user & server names [But I cannot
find them in the .pdf files].
Any suggestions?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own