Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » AdoRecordsetView and Stored procedures Collapse All
Subject Author Date
Mantra Jan 25, 2011 - 3:20 AM

ist there a way to chache all Data from a rowset when using Sample App AdoRecordsetView ?

On normal selects there’s no problem, but with SP’s there will be only the header loaded.


When looping truth the recordset, there are records present, so it’s not a rowset problem.


Thanks !


 

Mantra Feb 1, 2011 - 6:56 AM

I don’t need to send you a testproject ..


this message is coming from your ADO example.


I’ll send you regrading this post a SP and a small DB where you can check this issue. 



Thanks !

Technical Support Feb 1, 2011 - 9:55 AM

Still didn’t receive any e-mail from you.

Technical Support Jan 25, 2011 - 12:25 PM

There is no difference between SELECTs and SPs. Please check your SP using Query Analyzer. It must return a recordset you expect to see.

Mantra Jan 28, 2011 - 3:02 AM

If I loop thrue the records and load them manualy (see code below) it works. 

So there is a recordset. If I use the sample app, i get this message :


The opened ADO recordset object has changed the requested record scrolling type to **adOpenForwardOnly**

(this may caused by limited cursor library implementation of currently used OLE-DB provider)


On the example app i use the following Connectionstr: 

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ALKIDEV;Data Source=BTTSRVDB02



If I change adOpenForwardOnly or any other settings I never get a result back in ADOrecordsetView !


Query is as SP: 

exec spQueryVertreterBeleg @VertreterID = 0, @vonDatum = ’20100101’, @bisDatum = ’20101231’


Manuell loop and load to the grid (its a wrapper class I wrote) :



_variant_t var;


CString strMsg;


 



long Index = m_objAdoRS->GetFields()->Count;long RecCount = 0;// loop thru the recordset

 


{


 


{


var = m_objAdoRS->GetFields()->Item[x]->Value;


 


while (! m_objAdoRS->GetADOEOF())for (long x = 0; x < Index; x++)switch (var.vt) //m_objAdoRS->GetFields()->Item[x]->Type)

{


 


 


case VT_EMPTY:case VT_NULL: // empty

{


 


{


InsertItem(RecCount, _T(


}


if (x == 0)"NULL"));else

{


SetItemText(RecCount, x, _T(


}


 


}


 


 


{


AddRow(RecCount);


}


SetItemNumber(RecCount, x, var.fltVal);


 


 


 


{


AddRow(RecCount);


}


SetItemNumber(RecCount, x, var.dblVal);


 


 


 


 


{


AddRow(RecCount);


}


SetItemNumberLong(RecCount, x, var.iVal);


 


 


 


{


AddRow(RecCount);


}


SetItemNumberLong(RecCount, x, var.intVal);


 


 


 


{


AddRow(RecCount);


}


SetItemNumberLong(RecCount, x, var.lVal);


 


 


 


{


AddRow(RecCount);


}


SetItemNumberLong(RecCount, x, var.ulVal);


 


 


{


var.ChangeType(VT_R8);


 


{


AddRow(RecCount);


}


SetItemNumber(RecCount, x, var.dblVal);


 


}


 


{


 


{


AddRow(RecCount);


}


var.ChangeType(VT_R8);


SetItemNumber(RecCount, x, var.dblVal);


 


}


 


"NULL"));break;case VT_R4:if (x == 0)break;case VT_R8:if (x == 0)break;case VT_I2:case VT_UI1:if (x == 0)break;case VT_INT:if (x == 0)break;case VT_I4:if (x == 0)break;case VT_UI4:if (x == 0)break;case VT_DECIMAL:if (x == 0)break;case VT_CY:if (x == 0)break;case VT_BOOL: // boolean

{


 


strMsg = _T(


 


if (var.boolVal)"TRUE");else

strMsg = _T(


 


{


InsertItem(RecCount, strMsg);


}


"FALSE");if (x == 0)else

{


SetItemText(RecCount, x, strMsg);


}


 


}


 


break;case VT_ERROR: // Error

{


strMsg = _T(


 


{


InsertItem(RecCount, strMsg);


}


"ERROR");if (x == 0)else

{


SetItemText(RecCount, x, strMsg);


}


 


}


 


break;case VT_DATE: // datetime

{


COleDateTime dt(var.date);


 


{


AddRow(RecCount);


}


SetDateTimeCtrlDate(RecCount, x, dt);


if (x == 0)// index = 0 -> Insert Item!

 


}


 


break;case VT_BSTR: // bytestrings WCHAR and other strings

{


strMsg = var.bstrVal;


 


{


InsertItem(RecCount, (LPCTSTR) strMsg);


}


if (x == 0)else

{


SetItemText(RecCount, x, (LPCTSTR) strMsg);


}


 


}


 


 


}


}


m_objAdoRS->MoveNext();


RecCount++;


}


break;default:break;

 



 


m_objAdoRS->MoveFirst();


 

Technical Support Jan 28, 2011 - 7:21 AM

Could you create a simple test project reproducing this problem and send it to us?