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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. A question about Microsoft DataGrid Control, Version 6.0(OLEDB)

A question about Microsoft DataGrid Control, Version 6.0(OLEDB)

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comhelptutorial
28 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dreamz

    When you create a member variable the declaration will come in the Class' .h File and a reference ( like this .. DDX_Control(pDX, IDC_DATAGRID1, m_datagrid1) ) will be there in the DoDataExchange function. Still i couln't get what can be the problem.. :( Can you try to delete the varible by the "Delete Variable" button in the "Add Member Variable Dialog"...

    I Offline
    I Offline
    IsaacLitingjun
    wrote on last edited by
    #5

    At first,Thanks again! when i now create a new project and do as following steps: 1. Insert ActiveX control: Microsoft DataGrid Control, Version 6.0(OLEDB); 2. Use classwizard bind the IDC_DATAGRID1,and a dialog come out: "The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." and then i can find : CFormView::DoDataExchange(pDX); //{{AFX_DATA_MAP(CStepbystepView) DDX_Control(pDX, IDC_DATAGRID1, m_datagridctrl); //}}AFX_DATA_MAP in DoDataExchange function. but i don't know the project now i'm running, i Insert ActiveX control but that dialog ""The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." didn't come out :( maybe because i have added CDataGrid1 class manually before? but now i searched DataGrid in files,i find nothing, i don't known :( Thank you again for your help! this question has puzzled me for a long time! hope to hear good news! Best Wishes, --------------------------- You will when you believe! ------------------------

    D 1 Reply Last reply
    0
    • D Dreamz

      When you create a member variable the declaration will come in the Class' .h File and a reference ( like this .. DDX_Control(pDX, IDC_DATAGRID1, m_datagrid1) ) will be there in the DoDataExchange function. Still i couln't get what can be the problem.. :( Can you try to delete the varible by the "Delete Variable" button in the "Add Member Variable Dialog"...

      I Offline
      I Offline
      IsaacLitingjun
      wrote on last edited by
      #6

      yes,i have tried to delete the varible by the "Delete Variable" button, that can be done, and i double click Add Varible the Variable type is CDataGrid1, but i don't have CDataGrid1 class in classview at all :( hope you can understand... Best wishes, --------------------------- You will when you believe! ------------------------

      D 1 Reply Last reply
      0
      • I IsaacLitingjun

        At first,Thanks again! when i now create a new project and do as following steps: 1. Insert ActiveX control: Microsoft DataGrid Control, Version 6.0(OLEDB); 2. Use classwizard bind the IDC_DATAGRID1,and a dialog come out: "The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." and then i can find : CFormView::DoDataExchange(pDX); //{{AFX_DATA_MAP(CStepbystepView) DDX_Control(pDX, IDC_DATAGRID1, m_datagridctrl); //}}AFX_DATA_MAP in DoDataExchange function. but i don't know the project now i'm running, i Insert ActiveX control but that dialog ""The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." didn't come out :( maybe because i have added CDataGrid1 class manually before? but now i searched DataGrid in files,i find nothing, i don't known :( Thank you again for your help! this question has puzzled me for a long time! hope to hear good news! Best Wishes, --------------------------- You will when you believe! ------------------------

        D Offline
        D Offline
        Dreamz
        wrote on last edited by
        #7

        I think in your new application its works fine :) Dick.lee Solucky wrote: but i don't know the project now i'm running, i Insert ActiveX control but that dialog ""The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." didn't come out :confused: Once you have added the classes this messagebox wont come again...

        I 1 Reply Last reply
        0
        • I IsaacLitingjun

          yes,i have tried to delete the varible by the "Delete Variable" button, that can be done, and i double click Add Varible the Variable type is CDataGrid1, but i don't have CDataGrid1 class in classview at all :( hope you can understand... Best wishes, --------------------------- You will when you believe! ------------------------

          D Offline
          D Offline
          Dreamz
          wrote on last edited by
          #8

          Dick.lee Solucky wrote: Add Varible the Variable type is CDataGrid1, but i don't have CDataGrid1 class in classview at all By default wizard will give you the class name as CDataGrid.Did you change that? Dick.lee Solucky wrote: but i don't have CDataGrid1 class in classview at all Please check whether all the files are added to your workspace.Else you can add them from the working folder... Could you add the member variable...??

          I 1 Reply Last reply
          0
          • D Dreamz

            Dick.lee Solucky wrote: Add Varible the Variable type is CDataGrid1, but i don't have CDataGrid1 class in classview at all By default wizard will give you the class name as CDataGrid.Did you change that? Dick.lee Solucky wrote: but i don't have CDataGrid1 class in classview at all Please check whether all the files are added to your workspace.Else you can add them from the working folder... Could you add the member variable...??

            I Offline
            I Offline
            IsaacLitingjun
            wrote on last edited by
            #9

            *Dreamz wrote: By default wizard will give you the class name as CDataGrid.Did you change that? yes!exactly!that's my problem! :(( i didn't known at that time so i added CDataGrid class myself(so stupid! :sigh: ) and i added twice,so now i got CDataGrid1 *Dreamz wrote: Please check whether all the files are added to your workspace.Else you can add them from the working folder... now what i want is just that very beginning's dialog: like just i'm beginning a new project. :(( Thanks again for your help!!!!! You're so kind!!!!!!!!!!! wait for you... ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

            D 2 Replies Last reply
            0
            • D Dreamz

              I think in your new application its works fine :) Dick.lee Solucky wrote: but i don't know the project now i'm running, i Insert ActiveX control but that dialog ""The ActiveX Control "Microsoft DataGrid Control, Version 6.0(OLEDB)" has not been inserted into the project. Developer Studio will do this now and generate a C++ wrapper class for it." didn't come out :confused: Once you have added the classes this messagebox wont come again...

              I Offline
              I Offline
              IsaacLitingjun
              wrote on last edited by
              #10

              *Dreamz wrote: Once you have added the classes this messagebox wont come again... what i want now is just it come out again... and this time i want to do it right. ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

              D 1 Reply Last reply
              0
              • I IsaacLitingjun

                *Dreamz wrote: Once you have added the classes this messagebox wont come again... what i want now is just it come out again... and this time i want to do it right. ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                D Offline
                D Offline
                Dreamz
                wrote on last edited by
                #11

                :confused: :(

                1 Reply Last reply
                0
                • I IsaacLitingjun

                  *Dreamz wrote: By default wizard will give you the class name as CDataGrid.Did you change that? yes!exactly!that's my problem! :(( i didn't known at that time so i added CDataGrid class myself(so stupid! :sigh: ) and i added twice,so now i got CDataGrid1 *Dreamz wrote: Please check whether all the files are added to your workspace.Else you can add them from the working folder... now what i want is just that very beginning's dialog: like just i'm beginning a new project. :(( Thanks again for your help!!!!! You're so kind!!!!!!!!!!! wait for you... ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                  D Offline
                  D Offline
                  Dreamz
                  wrote on last edited by
                  #12

                  Ok........ Now i got what you want to do... You have to remove all that reference to the DataGrid control.... I also dont know how to remove the control once it is added... I'll check it and get back to you ..... :) Good Luck....

                  I 1 Reply Last reply
                  0
                  • D Dreamz

                    Ok........ Now i got what you want to do... You have to remove all that reference to the DataGrid control.... I also dont know how to remove the control once it is added... I'll check it and get back to you ..... :) Good Luck....

                    I Offline
                    I Offline
                    IsaacLitingjun
                    wrote on last edited by
                    #13

                    *Dreamz wrote: Now i got what you want to do... it's so sweet... ;) *Dreamz wrote: I'll check it and get back to you ..... you're my hero! ^.^ Thanks! Have a good day! and wish everything goes well! " remove all that reference to the DataGrid control...." and i also learn how to ask questions ! ;) Thanks! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                    D 1 Reply Last reply
                    0
                    • I IsaacLitingjun

                      *Dreamz wrote: By default wizard will give you the class name as CDataGrid.Did you change that? yes!exactly!that's my problem! :(( i didn't known at that time so i added CDataGrid class myself(so stupid! :sigh: ) and i added twice,so now i got CDataGrid1 *Dreamz wrote: Please check whether all the files are added to your workspace.Else you can add them from the working folder... now what i want is just that very beginning's dialog: like just i'm beginning a new project. :(( Thanks again for your help!!!!! You're so kind!!!!!!!!!!! wait for you... ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                      D Offline
                      D Offline
                      Dreamz
                      wrote on last edited by
                      #14

                      Delete all the newly added files for the DataGrid from your workspace and from the current working folder... Delete the include for datagrid.h and Rebuild all... Open the Project' .dsp file in a notepad.Towards the end of the file there will be some entries for the newly added files for the DataGrid. eg: # Section CPTest : {CDE57A43-8B86-11D0-B3C6-00A0C90AEA82} # 2:21:DefaultSinkHeaderFile:datagrid.h # 2:16:DefaultSinkClass:CDataGrid # End Section Delete all those sections for the classes that we deleted.. Rebuild All...Now do what you want..You will get "Your Message" dialog.. :) Note: Dear Dick.lee Solucky... This is what i tried by created an application like yours... I am not sure that this is a right way or not... So if you use this,please make a copy of your application and proceed...please..:) I could build the application without any error.... Good Luck

                      I 1 Reply Last reply
                      0
                      • I IsaacLitingjun

                        *Dreamz wrote: Now i got what you want to do... it's so sweet... ;) *Dreamz wrote: I'll check it and get back to you ..... you're my hero! ^.^ Thanks! Have a good day! and wish everything goes well! " remove all that reference to the DataGrid control...." and i also learn how to ask questions ! ;) Thanks! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                        D Offline
                        D Offline
                        Dreamz
                        wrote on last edited by
                        #15

                        Thanks a lot :)

                        I 1 Reply Last reply
                        0
                        • D Dreamz

                          Delete all the newly added files for the DataGrid from your workspace and from the current working folder... Delete the include for datagrid.h and Rebuild all... Open the Project' .dsp file in a notepad.Towards the end of the file there will be some entries for the newly added files for the DataGrid. eg: # Section CPTest : {CDE57A43-8B86-11D0-B3C6-00A0C90AEA82} # 2:21:DefaultSinkHeaderFile:datagrid.h # 2:16:DefaultSinkClass:CDataGrid # End Section Delete all those sections for the classes that we deleted.. Rebuild All...Now do what you want..You will get "Your Message" dialog.. :) Note: Dear Dick.lee Solucky... This is what i tried by created an application like yours... I am not sure that this is a right way or not... So if you use this,please make a copy of your application and proceed...please..:) I could build the application without any error.... Good Luck

                          I Offline
                          I Offline
                          IsaacLitingjun
                          wrote on last edited by
                          #16

                          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! -------------------------

                          I D 2 Replies Last reply
                          0
                          • I IsaacLitingjun

                            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! -------------------------

                            I Offline
                            I Offline
                            IsaacLitingjun
                            wrote on last edited by
                            #17

                            Dick.lee Solucky wrote: CDE57A43-8B86-11D0-B3C6-00A0C90AEA82 i felt dazzle when i saw these before,,, :omg: but today, i find it's so lovely! VC is really huge!! Dick.lee Solucky wrote: 2:21: and what does this mean for.... there are so many questions in my head! but i'm so excited!!! :laugh: *Dreamz,Thanks again! wish everything goes well! Merry Christmas,and so nice to meet you !!!!!!! :) Wish everyone at CP have a great Christmas and next year we can have more and more people here in CP ,cos it's really great place ! :) ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                            1 Reply Last reply
                            0
                            • D Dreamz

                              Thanks a lot :)

                              I Offline
                              I Offline
                              IsaacLitingjun
                              wrote on last edited by
                              #18

                              It's me should say thanks! wish everything goes well! ------------------------- Best Wishes sehsiW tseB ------------------------- You will when you believe! -------------------------

                              1 Reply Last reply
                              0
                              • I IsaacLitingjun

                                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! -------------------------

                                D Offline
                                D Offline
                                Dreamz
                                wrote on last edited by
                                #19

                                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

                                P 1 Reply Last reply
                                0
                                • D Dreamz

                                  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

                                  P Offline
                                  P Offline
                                  Prakash Nadar
                                  wrote on last edited by
                                  #20

                                  hi dreamz, was reading the thread, was very educational for me too. and glad that you are an angel now...:-)


                                  -prakash

                                  D 1 Reply Last reply
                                  0
                                  • P Prakash Nadar

                                    hi dreamz, was reading the thread, was very educational for me too. and glad that you are an angel now...:-)


                                    -prakash

                                    D Offline
                                    D Offline
                                    Dreamz
                                    wrote on last edited by
                                    #21

                                    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....:)

                                    I 1 Reply Last reply
                                    0
                                    • D Dreamz

                                      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....:)

                                      I Offline
                                      I Offline
                                      IsaacLitingjun
                                      wrote on last edited by
                                      #22

                                      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! -------------------------

                                      D 1 Reply Last reply
                                      0
                                      • I IsaacLitingjun

                                        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! -------------------------

                                        D Offline
                                        D Offline
                                        Dreamz
                                        wrote on last edited by
                                        #23

                                        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 2 Replies Last reply
                                        0
                                        • D Dreamz

                                          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 Offline
                                          I Offline
                                          IsaacLitingjun
                                          wrote on last edited by
                                          #24

                                          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! -------------------------

                                          I 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

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