Hello,
I have a problem accesing INFORMIX DBMS via ODBC using C and INTERSOLV 3.1 ODBC DRIVER on Windows 2000 Server.
My source codel looks like:
rc = SQLAllocEnv (&henv);
rc = SQLAllocConnect (henv, &hdbc);
rc = SQLConnect (hdbc,(unsigned char *)dbname, SQL_NTS, (unsigned char *)dbuser, SQL_NTS, (unsigned char *)dbuser_passwd, SQL_NTS);
//**** SELECT ****//
lstrcpy(sql_command,"SELECT area_code, from_dn, to_dn FROM numbering_plan"
rc = SQLExecDirect (hstmt, (unsigned char *)sql_command, SQL_NTS);
The following errors occured:
SQL connect returns 1; SQL_SUCCESS_WITH_INFO
SQLExecDirect returns -2; SQL_INVALID_HANDLE
Where is the catch? What means SQL_INVALID_HANDLE? What am I doing wrong?
Best regards!
I have a problem accesing INFORMIX DBMS via ODBC using C and INTERSOLV 3.1 ODBC DRIVER on Windows 2000 Server.
My source codel looks like:
rc = SQLAllocEnv (&henv);
rc = SQLAllocConnect (henv, &hdbc);
rc = SQLConnect (hdbc,(unsigned char *)dbname, SQL_NTS, (unsigned char *)dbuser, SQL_NTS, (unsigned char *)dbuser_passwd, SQL_NTS);
//**** SELECT ****//
lstrcpy(sql_command,"SELECT area_code, from_dn, to_dn FROM numbering_plan"
rc = SQLExecDirect (hstmt, (unsigned char *)sql_command, SQL_NTS);
The following errors occured:
SQL connect returns 1; SQL_SUCCESS_WITH_INFO
SQLExecDirect returns -2; SQL_INVALID_HANDLE
Where is the catch? What means SQL_INVALID_HANDLE? What am I doing wrong?
Best regards!