We are using the XPressQuantumGrid in bound mode with an ADO recordset
under Windows 7 (32 bit) SP1 RC2 no error occurs, but under the 64 bit version we run into problems
We are using Visual Studio 2005.
Here is the program flow to fill the ADO recordset and bind it to the grid control:
// This way we import the ADO and the QuantumGrid
#pragma warning(push)
#pragma warning(disable:4192)
#import "msdatsrc.tlb" no_namespace
#import "dXDBGrid.dll" no_namespace, no_implementation, raw_interfaces_only, exclude("IAsyncManager")
#pragma warning(pop)
// The "msdatsrc.tlb" is from 14.07.2009
// first the refresh is stopped
m_Grid.GetEx().SetLockRefresh(TRUE);
// we create a ADO recordset which is not connected to a database
_RecordsetPtr spRecSet(__uuidof(Recordset));
// Add columns…
spRecSet->Open(vtMissing, vtMissing, adOpenUnspecified, adLockUnspecified, -1);
//The ADO recordset is bound to the grid like this:
m_Grid.SetRefDataSource(spRecSet);
m_Grid.GetM().FullExpand();
// Turn refresh on again
m_Grid.GetEx().SetLockRefresh(FALSE);
Even if the recordset is empty then this line gives a general exception:
m_Grid.GetDataset().GetADODataset().UpdateBatch(arAll);
In the debugger output window following information is displayed
First-chance exception at 0x765ab727 in qw.exe: Microsoft C++ exception: CxException at memory location 0x00186848…
First-chance exception at 0x765ab727 in qw.exe: Microsoft C++ exception: COleDispatchException at memory location 0x001869ec…
When some records are added to the grid and we interate through them,
we enter an endless loop (next is not moving to the next record) and the VARIANT value is always empty.
m_Grid.GetDataset().First();
while (!m_Grid.GetDataset().GetEof())
{
VARIANT varValue = m_Grid.GetDataset().GetFieldByName(FIELD_ID);
if (VT_EMPTY != varValue.vt)
{
// Do something…
}
m_Grid.GetDataset().Next();
} //while
Any idea what's wrong?
Thanks for any feedback.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
I closed the issue by accident…
Hi Henk,
This is the first time we have been told about this issue. It may be peculiar to Win 7 64-bit systems, which XpressQuantumGrid does not officially support. This control was designed a while ago, and we cannot guarantee that it works correctly with modern OSes. In any case, I recommend that you perform a small test in the same environment: Create a disconnected ADO recordset and bind it to an ADODC control or standard DataGrid. What are your results?
Regards,
Serge
See Also:
Help with an older dxGrid application running on Windows 7