sqldata/sqldata.cpp
// Define the source and target types
Define the source and target types
Define the source and target types
short SqlData::DefineDbType(const char *conn)
{
	if(conn == NULL)
		return -1;
	if(_strnicmp(conn, "oracle", 6) == 0)
		return SQLDATA_ORACLE;
	else
	if(_strnicmp(conn, "sql", 3) == 0)
		return SQLDATA_SQL_SERVER;
	else
	if(_strnicmp(conn, "mysql", 5) == 0)
		return SQLDATA_MYSQL;
    else
	if(_strnicmp(conn, "mariadb", 7) == 0)
		return SQLDATA_MYSQL;
	else
	if(_strnicmp(conn, "pg", 2) == 0)
		return SQLDATA_POSTGRESQL;
	else
	if(_strnicmp(conn, "sybase", 6) == 0)
		return SQLDATA_SYBASE;
	else
	if(_strnicmp(conn, "informix", 8) == 0)
		return SQLDATA_INFORMIX;
	else
	if(_strnicmp(conn, "db2", 3) == 0)
		return SQLDATA_DB2;
	else
	if(_strnicmp(conn, "asa", 3) == 0)
		return SQLDATA_ASA;
	else
	if(_strnicmp(conn, "odbc", 4) == 0)
		return SQLDATA_ODBC;
	else
	if(_strnicmp(conn, "stdout", 6) == 0)
		return SQLDATA_STDOUT;
	return -1;
}
short SqlData :: DefineDbType ( const char * conn ) { if ( conn == NULL ) return -1 ; if ( _strnicmp ( conn , " " , 6 ) == 0 ) return SQLDATA_ORACLE ; else if ( _strnicmp ( conn , " " , 3 ) == 0 ) return SQLDATA_SQL_SERVER ; else if ( _strnicmp ( conn , " " , 5 ) == 0 ) return SQLDATA_MYSQL ; else if ( _strnicmp ( conn , " " , 7 ) == 0 ) return SQLDATA_MYSQL ; else if ( _strnicmp ( conn , " " , 2 ) == 0 ) return SQLDATA_POSTGRESQL ; else if ( _strnicmp ( conn , " " , 6 ) == 0 ) return SQLDATA_SYBASE ; else if ( _strnicmp ( conn , " " , 8 ) == 0 ) return SQLDATA_INFORMIX ; else if ( _strnicmp ( conn , " " , 3 ) == 0 ) return SQLDATA_DB2 ; else if ( _strnicmp ( conn , " " , 3 ) == 0 ) return SQLDATA_ASA ; else if ( _strnicmp ( conn , " " , 4 ) == 0 ) return SQLDATA_ODBC ; else if ( _strnicmp ( conn , " " , 6 ) == 0 ) return SQLDATA_STDOUT ; return -1 ; }
Define the source and target types
Define the source and target types