Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to change the icon i listctrl? Pin
Hamid_RT25-Jun-06 18:16
Hamid_RT25-Jun-06 18:16 
AnswerRe: How to change the icon i listctrl? Pin
Michael Dunn25-Jun-06 7:50
sitebuilderMichael Dunn25-Jun-06 7:50 
GeneralRe: How to change the icon i listctrl? Pin
xuwenq8825-Jun-06 17:43
xuwenq8825-Jun-06 17:43 
GeneralRe: How to change the icon i listctrl? Pin
Michael Dunn25-Jun-06 17:45
sitebuilderMichael Dunn25-Jun-06 17:45 
GeneralRe: How to change the icon i listctrl? Pin
xuwenq8826-Jun-06 5:50
xuwenq8826-Jun-06 5:50 
QuestionCRecordset problem Pin
moodsey21124-Jun-06 22:06
moodsey21124-Jun-06 22:06 
AnswerRe: CRecordset problem Pin
ovidiucucu25-Jun-06 1:30
ovidiucucu25-Jun-06 1:30 
AnswerRe: CRecordset problem Pin
ovidiucucu25-Jun-06 2:18
ovidiucucu25-Jun-06 2:18 
... and if you want to use CRecordset (for SELECT statements, no way, you must do it), instantiate a CRecordset object (no need to derive) the call CRecordset::Open, and so on.

See example below
TRY
{
   CRecordset rs(&m_db);
   rs.Open(CRecordset::forwardOnly,
           _T("SELECT Name, OwnerName FROM Cats"));
   while(!rs.IsEOF())
   {
      const int nFieldsCount = rs.GetODBCFieldCount();
      for(int nFieldIndex = 0; nFieldIndex < nFieldsCount; nFieldIndex++)
      {
         // next field
         CDBVariant dbvarValue;
         rs.GetFieldValue(nFieldIndex, dbvarValue);
         // enjoy of field value...
      }
      rs.MoveNext(); // next record set row
   }
   rs.Close();
}
CATCH(CDBException, e)
{
   e->ReportError(); // see what's going wrong
}
AND_CATCH(CMemoryException, e)
{
   e->ReportError(); // see what's going wrong
}
END_CATCH


Ovidiu Cucu
Microsoft MVP - Visual C++
QuestionHelp! How to add combobox into a listctrl ? Pin
xjbetter24-Jun-06 21:51
xjbetter24-Jun-06 21:51 
AnswerRe: Help! How to add combobox into a listctrl ? Pin
ovidiucucu25-Jun-06 1:44
ovidiucucu25-Jun-06 1:44 
AnswerRe: Help! How to add combobox into a listctrl ? Pin
Hamid_RT25-Jun-06 1:53
Hamid_RT25-Jun-06 1:53 
Questionvisual studio 2005 problem with converting strings Pin
cv_k3n24-Jun-06 19:45
cv_k3n24-Jun-06 19:45 
AnswerRe: visual studio 2005 problem with converting strings [modified] Pin
Stephen Hewitt24-Jun-06 19:50
Stephen Hewitt24-Jun-06 19:50 
GeneralRe: visual studio 2005 problem with converting strings Pin
cv_k3n24-Jun-06 20:03
cv_k3n24-Jun-06 20:03 
GeneralRe: visual studio 2005 problem with converting strings [modified] Pin
Stephen Hewitt24-Jun-06 20:07
Stephen Hewitt24-Jun-06 20:07 
GeneralRe: visual studio 2005 problem with converting strings Pin
cv_k3n24-Jun-06 20:36
cv_k3n24-Jun-06 20:36 
GeneralRe: visual studio 2005 problem with converting strings [modified] Pin
Stephen Hewitt24-Jun-06 21:24
Stephen Hewitt24-Jun-06 21:24 
GeneralRe: visual studio 2005 problem with converting strings Pin
cv_k3n24-Jun-06 22:05
cv_k3n24-Jun-06 22:05 
GeneralRe: visual studio 2005 problem with converting strings Pin
Stephen Hewitt24-Jun-06 22:09
Stephen Hewitt24-Jun-06 22:09 
GeneralRe: visual studio 2005 problem with converting strings Pin
cv_k3n24-Jun-06 23:25
cv_k3n24-Jun-06 23:25 
GeneralRe: visual studio 2005 problem with converting strings Pin
Stephen Hewitt24-Jun-06 23:32
Stephen Hewitt24-Jun-06 23:32 
GeneralRe: visual studio 2005 problem with converting strings Pin
cv_k3n25-Jun-06 0:15
cv_k3n25-Jun-06 0:15 
GeneralRe: visual studio 2005 problem with converting strings Pin
Stephen Hewitt25-Jun-06 0:22
Stephen Hewitt25-Jun-06 0:22 
GeneralRe: visual studio 2005 problem with converting strings Pin
Michael Dunn25-Jun-06 7:52
sitebuilderMichael Dunn25-Jun-06 7:52 
Questionwhy is a virus, my pe file? Pin
zon_cpp24-Jun-06 19:31
zon_cpp24-Jun-06 19:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.