Code:
if( (ret=ex_connect(context,&connection,"SO_PLATE",gszSqlUser,gszSqlPassword,gszDBServer)) != CS_SUCCEED)
{
fLogError("SO_PLATE - Unsuccessful LOGIN on database.");
fLogError("SO_PLATE - Unsuccessful OPEN on database PMLL.");
//return 0;
exit(ERREXIT);
}
strcpy(sql_string, "USE pmll_test");
strcat(sql_string,gszDBName);
//it is at this point that i am having the errors.
if((ret = ex_execute_cmd(connection,sql_string)) != CS_SUCCEED);
{
fLogError("SO_PLATE - Unsuccessful USE on database PMLL.");
//return 0;
exit(ERREXIT);
}
I just wanna know something. the datavalue for connection is being passed as &connection to ex_connect. The data type is CS_CONNECTION *connection. Will the changes that are being made inside the function 'ex_connect' be reflected in the rest of the code ? ex_connect takes in as second parameter a datatype of 'CS_CONNECTION **'
The error i am getting is cos, ct_cmd_alloc function is failing... would like to have some help on how to fix, and what might be the problem....