View | Details | Raw Unified | Return to issue 107794
Collapse All | Expand All

(-)source/inc/odbc/ODatabaseMetaDataResultSet.hxx (+1 lines)
Lines 100-105 Link Here
100
			sal_Int32 getFetchDirection()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
100
			sal_Int32 getFetchDirection()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
101
			sal_Int32 getFetchSize()			const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
101
			sal_Int32 getFetchSize()			const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
102
			::rtl::OUString getCursorName()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
102
			::rtl::OUString getCursorName()		const throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
103
            SWORD                               impl_getColumnType_nothrow(sal_Int32 column);
103
104
104
			sal_Int32 mapColumn (sal_Int32	column);
105
			sal_Int32 mapColumn (sal_Int32	column);
105
106
(-)source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx (-5 / +11 lines)
Lines 283-289 Link Here
283
		aDate.day = 0;
283
		aDate.day = 0;
284
		aDate.month = 0;
284
		aDate.month = 0;
285
		aDate.year = 0;
285
		aDate.year = 0;
286
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
286
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_DATE : SQL_C_TYPE_DATE,m_bWasNull,**this,&aDate,sizeof aDate);
287
		return Date(aDate.day,aDate.month,aDate.year);
287
		return Date(aDate.day,aDate.month,aDate.year);
288
	}
288
	}
289
	else
289
	else
Lines 434-440 Link Here
434
	columnIndex = mapColumn(columnIndex);
434
	columnIndex = mapColumn(columnIndex);
435
	::rtl::OUString aVal;
435
	::rtl::OUString aVal;
436
	if(columnIndex <= m_nDriverColumnCount)
436
	if(columnIndex <= m_nDriverColumnCount)
437
		aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,(SWORD)SQL_C_WCHAR,m_bWasNull,**this,m_nTextEncoding);
437
		aVal = OTools::getStringValue(m_pConnection,m_aStatementHandle,columnIndex,impl_getColumnType_nothrow(columnIndex),m_bWasNull,**this,m_nTextEncoding);
438
	else
438
	else
439
		m_bWasNull = sal_True;
439
		m_bWasNull = sal_True;
440
440
Lines 454-460 Link Here
454
	columnIndex = mapColumn(columnIndex);
454
	columnIndex = mapColumn(columnIndex);
455
	TIME_STRUCT aTime={0,0,0};
455
	TIME_STRUCT aTime={0,0,0};
456
	if(columnIndex <= m_nDriverColumnCount)
456
	if(columnIndex <= m_nDriverColumnCount)
457
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
457
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIME : SQL_C_TYPE_TIME,m_bWasNull,**this,&aTime,sizeof aTime);
458
	else
458
	else
459
		m_bWasNull = sal_True;
459
		m_bWasNull = sal_True;
460
	return Time(0,aTime.second,aTime.minute,aTime.hour);
460
	return Time(0,aTime.second,aTime.minute,aTime.hour);
Lines 472-478 Link Here
472
	columnIndex = mapColumn(columnIndex);
472
	columnIndex = mapColumn(columnIndex);
473
	TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0};
473
	TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0};
474
	if(columnIndex <= m_nDriverColumnCount)
474
	if(columnIndex <= m_nDriverColumnCount)
475
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
475
		OTools::getValue(m_pConnection,m_aStatementHandle,columnIndex,m_pConnection->useOldDateFormat() ? SQL_C_TIMESTAMP : SQL_C_TYPE_TIMESTAMP,m_bWasNull,**this,&aTime,sizeof aTime);
476
	else
476
	else
477
		m_bWasNull = sal_True;
477
		m_bWasNull = sal_True;
478
	return DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
478
	return DateTime((sal_uInt16)aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year);
Lines 1316-1320 Link Here
1316
}
1316
}
1317
// -----------------------------------------------------------------------------
1317
// -----------------------------------------------------------------------------
1318
1318
1319
SWORD ODatabaseMetaDataResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex)
1320
{
1321
    ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex);
1322
    if ( aFind == m_aODBCColumnTypes.end() )
1323
        aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pConnection,m_aStatementHandle,*this,columnIndex))).first;
1324
    return aFind->second;
1325
}
1319
1326
1320

Return to issue 107794