Hello world ! I am trying to develop a program to connect from a windows nt OS to a SUN-Unix v 4.0 Server and once connected to run an .exe program obtain/bring the result back to my windows nt computer. Is it possible? To connect to SQL Server I use this the following . How would it be for a unix machine?...
if ( SQLAllocEnv(&henv) != SQL_SUCCESS ) printf("cant create ODBC enviro.\n");
if ( SQLAllocConnect(henv, &hdbc) != SQL_SUCCESS ) printf("cant create ODBC connection variable.\n");
printf("database name: %s, username: %s, password %s.\n", DBNAME, DBUNAME, DBPWD);
rc = SQLConnect(hdbc, (UCHAR *)DBNAME, SQL_NTS, (UCHAR *)DBUNAME, SQL_NTS, (UCHAR *)DBPWD, SQL_NTS);
if ( ( rc != SQL_SUCCESS ) && ( rc != SQL_SUCCESS_WITH_INFO ) ) {
printf("Oops!!!!! No se pudo conectar al base de datos!!!!!\n");
printf("Error = %s. \n", rc);
printf("\n\nMarca ENTER para continuar
}
printf("Connected to Database xxx %s.\n", DBNAME);