sqldata/sqlapibase.cpp
// Initialize session by setting general options
Initialize session by setting general options
Initialize session by setting general options
void SqlApiBase::InitSession()
{
   	if(_parameters == NULL)
		return;
    int num = 0;
	const char *value = _parameters->Get("-batch_max_rows");
	if(Str::IsSet(value))
	{
        sscanf(value, "%d", &num);
        if(num > 0)
            _batch_max_rows = (size_t)num;		
	}
	num = 0;
	value = _parameters->Get("-lob_bind_buffer");
	if(Str::IsSet(value))
	{
        sscanf(value, "%d", &num);
        if(num > 0 && num < 1024*1024*100)
            _lob_bind_buffer = num;		
	}
	value = _parameters->Get("-char_length_ratio");
	if(Str::IsSet(value))
	{
		float val = 0.0;
		sscanf(value, "%f", &val);
		if(val != 0.0)
			_char_length_ratio = val;
	}
}
void SqlApiBase :: InitSession ( ) { if ( _parameters == NULL ) return ; int num = 0 ; const char * value = _parameters -> Get ( " " ) ; if ( Str :: IsSet ( value ) ) { sscanf ( value , " " , & num ) ; if ( num > 0 ) _batch_max_rows = ( size_t ) num ; } num = 0 ; value = _parameters -> Get ( " " ) ; if ( Str :: IsSet ( value ) ) { sscanf ( value , " " , & num ) ; if ( num > 0 && num < 1024 * 1024 * 100 ) _lob_bind_buffer = num ; } value = _parameters -> Get ( " " ) ; if ( Str :: IsSet ( value ) ) { float val = 0.0 ; sscanf ( value , " " , & val ) ; if ( val != 0.0 ) _char_length_ratio = val ; } }
Initialize session by setting general options
Initialize session by setting general options