Crash using MS ADO Data Control/MS DataGrid 6.0 
Author Message
 Crash using MS ADO Data Control/MS DataGrid 6.0

I'm just learning about ADO and associated controls.
I've created a dlg app using MFC wizard, and add a data source control, and
bound a DataGrid control to it. Also set up the connection to provider, and
the database, and SQL statement.

When I test the dlg using the dlg editor (Ctrl+T) it runs fine, and I can
scroll through the database, edit records etc.

But when I build and run the app, it crashes initialising the dlg when
trying to set the cursor.

I have added no code to my app, other than the generated code.

Is there something obvious I need to add, like some kind of software
initialisation (that happens automatically and is therefore not needed when
testing the dlg)?

Jon



Sun, 08 Aug 2004 01:13:29 GMT  
 Crash using MS ADO Data Control/MS DataGrid 6.0
Hello,

Do you create MFC with ActiveX supported? Add AfxEnableControlContainer(); in CyourApp::InitInstance() and try it.

Hope this helps.

Regards,
Max
==========================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

|Newsgroups: microsoft.public.vc.database
|Subject: Crash using MS ADO Data Control/MS DataGrid 6.0

|
|I'm just learning about ADO and associated controls.
|I've created a dlg app using MFC wizard, and add a data source control, and
|bound a DataGrid control to it. Also set up the connection to provider, and
|the database, and SQL statement.
|
|When I test the dlg using the dlg editor (Ctrl+T) it runs fine, and I can
|scroll through the database, edit records etc.
|
|But when I build and run the app, it crashes initialising the dlg when
|trying to set the cursor.
|
|I have added no code to my app, other than the generated code.
|
|Is there something obvious I need to add, like some kind of software
|initialisation (that happens automatically and is therefore not needed when
|testing the dlg)?
|
|Jon
|
|
|



Tue, 10 Aug 2004 10:11:10 GMT  
 Crash using MS ADO Data Control/MS DataGrid 6.0
This call is already present.
I just followed the instructions in topic "Using ADO Databinding in Visual
C++" from Oct2000 MSDN.

As I said, the dialog works fine when run in test mode from the dlg editor.
It id only when the App is built and run that it crashes. Call stack below.

CPtrList::GetHeadPosition() line 274 + 10 bytes
CDataSourceControl::UpdateCursor() line 2697 + 27 bytes
COleControlSite::XRowsetNotify::OnRowChange(COleControlSite::XRowsetNotify *
const 0x00781f5c, IRowset * 0x016c6dbc, unsigned long 1, const unsigned long
* 0x0078193c, unsigned long 4, unsigned long 4, IRowset * 0x016c6dbc) line
3474
MSADCE! 1f34103d()
MSADCE! 1f33f8dc()
ATL::CRowset::MoveNext(long 0, unsigned char 1) line 1101 + 56 bytes
ATL::CRowset::MoveNext() line 1084
ATL::CRowset::MoveFirst() line 1133
CDataSourceControl::GetMetaData() line 2224
CDataSourceControl::Initialize() line 2136 + 8 bytes
COleControlSite::EnableDSC() line 1335
CDataBoundProperty::GetCursor() line 3025
CDataBoundProperty::Notify() line 3005 + 8 bytes
CDataBoundProperty::SetDSCSite(COleControlSite * 0x00781e80
{COleControlSite}) line 2977
COccManager::BindControls(CWnd * 0x0065fcec {CGridTestDlg hWnd=0x00000684})
line 497
COccManager::CreateDlgControls(CWnd * 0x0065fcec {CGridTestDlg
hWnd=0x00000684}, void * 0x00424930, _AFX_OCC_DIALOG_INFO * 0x0065fc08) line
466
COccManager::CreateDlgControls(CWnd * 0x0065fcec {CGridTestDlg
hWnd=0x00000684}, const char * 0x00000066, _AFX_OCC_DIALOG_INFO *
0x0065fc08) line 352 + 23 bytes
CDialog::HandleInitDialog(unsigned int 3092, unsigned int 3092) line 612 +
29 bytes
CWnd::OnWndMsg(unsigned int 272, unsigned int 3092, long 0, long *
0x0065f8f4) line 1815 + 17 bytes
CWnd::WindowProc(unsigned int 272, unsigned int 3092, long 0) line 1585 + 30
bytes
AfxCallWndProc(CWnd * 0x0065fcec {CGridTestDlg hWnd=0x00000684}, HWND__ *
0x00000684, unsigned int 272, unsigned int 3092, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00000684, unsigned int 272, unsigned int 3092, long 0)
line 368
AfxWndProcBase(HWND__ * 0x00000684, unsigned int 272, unsigned int 3092,
long 0) line 220 + 21 bytes
KERNEL32! bff63613()
KERNEL32! bff848f7()

Jon


Quote:
> Hello,

> Do you create MFC with ActiveX supported? Add AfxEnableControlContainer();

in CyourApp::InitInstance() and try it.
Quote:

> Hope this helps.

> Regards,
> Max



Tue, 10 Aug 2004 22:52:32 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MS Data Grid Control - ADO

2. ADO: Which Edit Box control to use with ADO Data Control 6.0

3. ADO Data Control + DataGrid using VC++6

4. Using datagrid without ado data control

5. MS Tech support recomends NOT using the ADO Ole DB controls

6. ADO Data control bind to ADO DataGrid

7. I/O manopulators crashes MS VC++ 6.0 SP5 with INTENAL COMPILER ERROR

8. Transcation w/ MS ADO DataControl 6.0(OLE DB)?

9. Wanted : info on passing data between MS Java++ and MS VC++

10. How export listview-data to ms access or ms excel

11. Wanted : info on passing data between MS Java++ and MS VC++

12. Adding columns to ADO DataGrid Control (6.0)?

 

 
Powered by phpBB® Forum Software