// Name: dbgrid.cpp
// Purpose: Displays a wxDbTable in a wxGrid.
// Author: Roger Gammans, Paul Gammans
// Name: dbgrid.cpp
// Purpose: Displays a wxDbTable in a wxGrid.
// Author: Roger Gammans, Paul Gammans
// RCS-ID: $Id$
// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
// Licence: wxWindows licence
// RCS-ID: $Id$
// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
// Licence: wxWindows licence
// Branched From : dbgrid.cpp,v 1.18 2000/12/19 13:00:58
///////////////////////////////////////////////////////////////////////////////
// Branched From : dbgrid.cpp,v 1.18 2000/12/19 13:00:58
///////////////////////////////////////////////////////////////////////////////
wxDbGridTableBase::wxDbGridTableBase(wxDbTable *tab, wxDbGridColInfo* ColInfo,
int count, bool takeOwnership) :
wxDbGridTableBase::wxDbGridTableBase(wxDbTable *tab, wxDbGridColInfo* ColInfo,
int count, bool takeOwnership) :
//FIXME: should i remove m_ColInfo and m_data from m_attrProvider if a wxDbGridAttrProvider
// if ((provider = dynamic_cast<wxDbGridCellAttrProvider *>(GetAttrProvider())))
//FIXME: should i remove m_ColInfo and m_data from m_attrProvider if a wxDbGridAttrProvider
// if ((provider = dynamic_cast<wxDbGridCellAttrProvider *>(GetAttrProvider())))
- // Using C casting for now until we can support dynamic_cast with wxWindows
- if ((provider = (wxDbGridCellAttrProvider *)(GetAttrProvider())))
+ // Using C casting for now until we can support dynamic_cast with wxWidgets
+ provider = (wxDbGridCellAttrProvider *)(GetAttrProvider());
+ if (provider)
- // Using C casting for now until we can support dynamic_cast with wxWindows
- if ((provider = (wxDbGridCellAttrProvider *)(GetAttrProvider())))
+ // Using C casting for now until we can support dynamic_cast with wxWidgets
+ provider = (wxDbGridCellAttrProvider *)(GetAttrProvider());
+ if (provider)
// return false to get using wxVariant.
return false;
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
// return false to get using wxVariant.
return false;
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
(sqltype == SQL_C_DOUBLE))
{
(sqltype == SQL_C_SLONG) ||
(sqltype == SQL_C_ULONG) ||
(sqltype == SQL_C_FLOAT) ||
(sqltype == SQL_C_DOUBLE))
{
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
}
int sqltype = m_data->GetColDefs()[(m_ColInfo[col].DbCol)].SqlCtype;
if ((sqltype == SQL_C_SSHORT) ||
{
wxLogDebug(wxT("GetValueAsCustom() on %i,%i"),row,col);
ValidateRow(row);
{
wxLogDebug(wxT("GetValueAsCustom() on %i,%i"),row,col);
ValidateRow(row);
if (m_data->GetNumberOfColumns() <= m_ColInfo[col].DbCol)
{
wxFAIL_MSG (_T("You can not use GetValueAsCustom for virtual columns"));
return NULL;
}
if (m_data->GetNumberOfColumns() <= m_ColInfo[col].DbCol)
{
wxFAIL_MSG (_T("You can not use GetValueAsCustom for virtual columns"));
return NULL;
}
wxLogDebug(wxT("IsEmtpyCell on %i,%i"),row,col);
ValidateRow(row);
wxLogDebug(wxT("IsEmtpyCell on %i,%i"),row,col);
ValidateRow(row);
}
wxString wxDbGridTableBase::GetValue(int row, int col)
{
wxLogDebug(wxT("GetValue() on %i,%i"),row,col);
}
wxString wxDbGridTableBase::GetValue(int row, int col)
{
wxLogDebug(wxT("GetValue() on %i,%i"),row,col);
- wxDbLogExtendedErrorMsg("ODBC error during Query()\n\n", m_data->GetDb(),__FILE__,__LINE__);
+ wxDbLogExtendedErrorMsg(_T("ODBC error during Query()\n\n"), m_data->GetDb(),__TFILE__,__LINE__);