Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bsdtux

@bsdtux
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CRecordset fails to retrieve fileds when only one record is in the recordset .SOLVED ??
    B bsdtux

    Just so I understand what is going on I am going to put comments in the code. Tell me if I am wrong. And this will work until you get to the last row or does it fail at the first row?

    /**
    * This starts the master loop for all rows of included recordset
    */
    while( !pRecordset->IsEOF( ) )
    {
    //pRecordset->DoFieldExchange(PDX);
    buffer = strText.GetBuffer(256);
    // insert dummy item to list
    if(!pList->InsertItem(iItem,buffer,NULL))
    {
    // TRACE("\n buffer %s ",buffer);
    };

          // set item text 
          /\*\*
           \* This will loop through row in recordset and get its value
           \*/ 
          for( short index = 0; index < nFields; index++ )
          {
    

    This is where it fails
    pRecordset->GetFieldValue( index, strText );
    This is where it fails and the index is 1 during the failure

          if(!strText.CompareNoCase("48")) this is retruned with index = 0 
                    TRACE("\\n");
          TRACE("\\nstrText %s ", strText); 
                       buffer = strText.GetBuffer(256);
             pList->SetItemText(iItem,index,buffer);
             TRACE("\\n item %i field %i buffer %s ",iItem , index , buffer   );
             strText =""; 
          }
    
        /\*\*
         \* This moves down the row 
         \*/
        pRecordset->MoveNext( );
        iItem++;
     }
    
    C / C++ / MFC help database c++ question

  • CRecorset fails to retrive fields when there is only one record in recordset.
    B bsdtux

    Are you advancing the index in the loop so that the loop will end if you have only on value? Also would it be possible to see the source for this.

    Database help database c++

  • managing access to multiple stand alone installations
    B bsdtux

    If you are using SQL Server 2008 policy based management might be a solution. But again I think this was something introduced in SQL 2008.

    Database database sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups