A question about Microsoft DataGrid Control, Version 6.0(OLEDB)
-
Oh,my God! How can i express my thanks!!! my dear *Dreamz! now i'm following your method and open Project' .dsp in UltraEdit, i find: # Section stepbystep : {CDE57A43-8B86-11D0-B3C6-00A0C90AEA82} # 2:21:DefaultSinkHeaderFile:datagrid1.h # 2:16:DefaultSinkClass:CDataGrid1 # End Section Thank God! i finally find it! with your help! dear *Dreamz! how can i express my thanks!!!!!!! actually not only one,i also got: # Section stepbystep : {CDE57A43-8B86-11D0-B3C6-00A0C90AEA82} # 2:21:DefaultSinkHeaderFile:datagrid1.h # 2:16:DefaultSinkClass:CDataGrid1 # End Section # Section stepbystep : {BEF6E003-A874-101A-8BBA-00AA00300CAB} # 2:5:Class:COleFont # 2:10:HeaderFile:font.h # 2:8:ImplFile:font.cpp # End Section # Section stepbystep : {00028C02-0000-0000-0000-000000000046} # 2:5:Class:CDataGrid # 2:10:HeaderFile:datagrid.h # 2:8:ImplFile:datagrid.cpp # End Section # Section stepbystep : {7BF80981-BF32-101A-8BBB-00AA00300CAB} # 2:5:Class:CPicture # 2:10:HeaderFile:picture.h # 2:8:ImplFile:picture.cpp # End Section # Section stepbystep : {CDE57A41-8B86-11D0-B3C6-00A0C90AEA82} # 2:5:Class:CDataGrid1 # 2:10:HeaderFile:datagrid1.h # 2:8:ImplFile:datagrid1.cpp # End Section # Section stepbystep : {00028C00-0000-0000-0000-000000000046} # 2:21:DefaultSinkHeaderFile:datagrid.h # 2:16:DefaultSinkClass:CDataGrid # End Section all these things! i've been searching for month! *Dreamz wrote: Rebuild All...Now do what you want..You will get "Your Message" dialog.. Oh,my God!!!!!!! You're my Angel,*Dreamz!(hope you don't mind i call you that! ;P) You know, i've been really disappointed before, when every time i met questions of vc and i could't solve, i rebuilt a new project! :(( You show me that's not the right way! there are solutions! i will try not to escape from the problem,and face it bravely! because of you! This is really a wonderful place! so nice to meet you! Keep in touch! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
-
Happy to hear that you have got it working :) Dick.lee Solucky wrote: Oh,my God!!!!!!! You're my Angel,*Dreamz!(hope you don't mind i call you that! ) I don't mind .... :laugh: Good Luck
hi dreamz, was reading the thread, was very educational for me too. and glad that you are an angel now...:-)
-prakash
-
hi dreamz, was reading the thread, was very educational for me too. and glad that you are an angel now...:-)
-prakash
-
Mr.Prakash wrote: and glad that you are an angel now... Me too.... ;) Thanks Mr.Prakash..Nice to know that it was useful for you....:)
this is tougher time: my project is using Carlos's ado class, http://www.codeproject.com/database/caaadoclass1.asp[^] and now my problem is: i can't find my problem! Hi, *Dreamz, you know it's you give me strength to ask a question again! i really wanted to give up again(i'm ashamed of that!:sigh: ), but recalling all your efforts! i think i should continue to battle! :rose: but this time i really don't know where the problem is! :( last time, i thought it's because i added datagrid class in a wrong way, so it din't work, but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly. :(( all things go well when i created a new project, i just want to share ,,, Thanks! i even didn't know how to ask a question :( do u have any suggestions? or i leave my msn, and we talk there? dick_ltj@hotmail.com Thank you again! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
-
this is tougher time: my project is using Carlos's ado class, http://www.codeproject.com/database/caaadoclass1.asp[^] and now my problem is: i can't find my problem! Hi, *Dreamz, you know it's you give me strength to ask a question again! i really wanted to give up again(i'm ashamed of that!:sigh: ), but recalling all your efforts! i think i should continue to battle! :rose: but this time i really don't know where the problem is! :( last time, i thought it's because i added datagrid class in a wrong way, so it din't work, but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly. :(( all things go well when i created a new project, i just want to share ,,, Thanks! i even didn't know how to ask a question :( do u have any suggestions? or i leave my msn, and we talk there? dick_ltj@hotmail.com Thank you again! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
I am sorry to say but i am not able to access messenger from my office now... Post it here,or you can mail me as well.. Will try to reply you as soon as possible.... So what is the problem? :) Dick.lee Solucky wrote: but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly What happend??
-
I am sorry to say but i am not able to access messenger from my office now... Post it here,or you can mail me as well.. Will try to reply you as soon as possible.... So what is the problem? :) Dick.lee Solucky wrote: but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly What happend??
You must be the man God send you to help me! ;) Now I can describe what happened: I hope maybe can help you to find the problem out: :-D When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu, ////////////////////////////////// CDataBindDlg databinddlg; databinddlg.DoModal(); ////////////////////////////////// And the dialog can come out, and if I insert BreakPoint here : ////////////////////////////////// BOOL CDataBindDlg::OnInitDialog() { CDialog::OnInitDialog(); <-- BreakPoint … ////////////////////////////////// It can run here. -------------------------------------------------------------------------- But when I added the Microsoft DataGrid Control, Version 6.0(OLEDB), then I select in the menu, nothing happened, dialog didn't come out, And also program didn't stop at my breakpoint, I don't know where the problem is :( following code can run properly in my new build project,it's the code to bind Recordset to DataGrid //////////////////////////////////////////// CString strConnection = _T("Driver={Microsoft ODBC for Oracle};Server=tzcenter;Uid=voice_call;Pwd=voice_call;"); //strConnection = _T("Driver={SQL Server};Server=sysdevpdc;Trusted_Connection=Yes;Database=sysDev;uid=sa;pdw="); if(m_pDb.Open(strConnection)) { m_pRs = CADORecordset(&m_pDb); if(m_pRs.Open("t_ywdm_576", CADORecordset::openTable)) //if(m_pRs.Open("sysTable01", CADORecordset::openTable)) { m_datagridctrl.SetCaption("Clients"); m_datagridctrl.SetRefDataSource(NULL); m_datagridctrl.SetRefDataSource((LPUNKNOWN)m_pRs.GetRecordset()); m_datagridctrl.Refresh(); } } else { AfxMessageBox(m_pDb.GetLastErrorString()); DWORD dwError = m_pDb.GetLastError(); // return FALSE; } // return TRUE; // return TRUE unless you set the focus to a control ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
-
You must be the man God send you to help me! ;) Now I can describe what happened: I hope maybe can help you to find the problem out: :-D When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu, ////////////////////////////////// CDataBindDlg databinddlg; databinddlg.DoModal(); ////////////////////////////////// And the dialog can come out, and if I insert BreakPoint here : ////////////////////////////////// BOOL CDataBindDlg::OnInitDialog() { CDialog::OnInitDialog(); <-- BreakPoint … ////////////////////////////////// It can run here. -------------------------------------------------------------------------- But when I added the Microsoft DataGrid Control, Version 6.0(OLEDB), then I select in the menu, nothing happened, dialog didn't come out, And also program didn't stop at my breakpoint, I don't know where the problem is :( following code can run properly in my new build project,it's the code to bind Recordset to DataGrid //////////////////////////////////////////// CString strConnection = _T("Driver={Microsoft ODBC for Oracle};Server=tzcenter;Uid=voice_call;Pwd=voice_call;"); //strConnection = _T("Driver={SQL Server};Server=sysdevpdc;Trusted_Connection=Yes;Database=sysDev;uid=sa;pdw="); if(m_pDb.Open(strConnection)) { m_pRs = CADORecordset(&m_pDb); if(m_pRs.Open("t_ywdm_576", CADORecordset::openTable)) //if(m_pRs.Open("sysTable01", CADORecordset::openTable)) { m_datagridctrl.SetCaption("Clients"); m_datagridctrl.SetRefDataSource(NULL); m_datagridctrl.SetRefDataSource((LPUNKNOWN)m_pRs.GetRecordset()); m_datagridctrl.Refresh(); } } else { AfxMessageBox(m_pDb.GetLastErrorString()); DWORD dwError = m_pDb.GetLastError(); // return FALSE; } // return TRUE; // return TRUE unless you set the focus to a control ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
Dick.lee Solucky wrote: When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu, just mean i created a dialog and do nothing, of course it will show when i use "databinddlg.DoModal()" But when i added the Microsoft DataGrid Control, Version 6.0(OLEDB), dialog didn't come out, and the program also didn't run to -> CDialog::OnInitDialog(); i don't know where it stopped ... i guess there are some problems of the initialization of Microsoft DataGrid Control, Version 6.0(OLEDB) ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
-
You must be the man God send you to help me! ;) Now I can describe what happened: I hope maybe can help you to find the problem out: :-D When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu, ////////////////////////////////// CDataBindDlg databinddlg; databinddlg.DoModal(); ////////////////////////////////// And the dialog can come out, and if I insert BreakPoint here : ////////////////////////////////// BOOL CDataBindDlg::OnInitDialog() { CDialog::OnInitDialog(); <-- BreakPoint … ////////////////////////////////// It can run here. -------------------------------------------------------------------------- But when I added the Microsoft DataGrid Control, Version 6.0(OLEDB), then I select in the menu, nothing happened, dialog didn't come out, And also program didn't stop at my breakpoint, I don't know where the problem is :( following code can run properly in my new build project,it's the code to bind Recordset to DataGrid //////////////////////////////////////////// CString strConnection = _T("Driver={Microsoft ODBC for Oracle};Server=tzcenter;Uid=voice_call;Pwd=voice_call;"); //strConnection = _T("Driver={SQL Server};Server=sysdevpdc;Trusted_Connection=Yes;Database=sysDev;uid=sa;pdw="); if(m_pDb.Open(strConnection)) { m_pRs = CADORecordset(&m_pDb); if(m_pRs.Open("t_ywdm_576", CADORecordset::openTable)) //if(m_pRs.Open("sysTable01", CADORecordset::openTable)) { m_datagridctrl.SetCaption("Clients"); m_datagridctrl.SetRefDataSource(NULL); m_datagridctrl.SetRefDataSource((LPUNKNOWN)m_pRs.GetRecordset()); m_datagridctrl.Refresh(); } } else { AfxMessageBox(m_pDb.GetLastErrorString()); DWORD dwError = m_pDb.GetLastError(); // return FALSE; } // return TRUE; // return TRUE unless you set the focus to a control ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------
;P - - - - - - - - - - - - - - Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could ! Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ... There can be miracles! When you believe, though hope is frail, it's hard to kill! Who knows what miracles, you can achieve! When you believe, somehow you will ... YOU WILL WHEN YOU BELIEVE
-
I am sorry to say but i am not able to access messenger from my office now... Post it here,or you can mail me as well.. Will try to reply you as soon as possible.... So what is the problem? :) Dick.lee Solucky wrote: but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly What happend??
when i insert the control in my main form, a MessageBox will appear: "failed to create new document" (my VC6 is Chinese Edition,i don't know whether it's the right translation) i trace and find the information is coming from these code: ----------------------------------------------------------- // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. #include "stdafx.h" #ifdef AFX_CORE3_SEG #pragma code_seg(AFX_CORE3_SEG) #endif #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif .... int nResult = ::MessageBox(hWnd, lpszPrompt, pszAppName, nType); ----------------------------------------------------------- i don't know whether it can help you to figure it out. Thanks!!!!!!!!!!!!!!!!!!!!! Best wishes! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could ! Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ... There can be miracles! When you believe, though hope is frail, it's hard to kill ! Who knows what miracles, you can achieve! When you believe, somehow you will ... YOU WILL WHEN YOU BELIEVE
-
when i insert the control in my main form, a MessageBox will appear: "failed to create new document" (my VC6 is Chinese Edition,i don't know whether it's the right translation) i trace and find the information is coming from these code: ----------------------------------------------------------- // This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. #include "stdafx.h" #ifdef AFX_CORE3_SEG #pragma code_seg(AFX_CORE3_SEG) #endif #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif .... int nResult = ::MessageBox(hWnd, lpszPrompt, pszAppName, nType); ----------------------------------------------------------- i don't know whether it can help you to figure it out. Thanks!!!!!!!!!!!!!!!!!!!!! Best wishes! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could ! Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ... There can be miracles! When you believe, though hope is frail, it's hard to kill ! Who knows what miracles, you can achieve! When you believe, somehow you will ... YOU WILL WHEN YOU BELIEVE
for the code i can view, i find when the program run here, the MessageBox appeared: ----------------------------------------------------------- // stepbystep.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "stepbystep.h" ...... // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; <-- return FALSE ----------------------------------------------------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could ! Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ... There can be miracles! When you believe, though hope is frail, it's hard to kill ! Who knows what miracles, you can achieve! When you believe, somehow you will ... YOU WILL WHEN YOU BELIEVE