I tried this code for Line1 too: m_RptReportInfo->Database->Tables->GetItem( 1 )->SetDataSource( _variant_t( (IDispatch *)m_pRec, true ) );
the problem is the program shows ALL records ... and NOT the filtered recs !!
1- Can u tell me what's wrong with my code ?!
2- ( ADO Question ):
say i have two _RecordsetPtr objects ..
for example: _Rec1, _Rec2 ..
_Recs1 fills by some records (by Open() mehod)
Is there anyway to copy some records from _Rec1 to _Rec2 ?!
for example i want to copy Record (pos) number 3, 10, 16 to _Rec2
I have a dialog box with id IDD_AGREE_FRAME_ABSTRACTION . This class's all cotrols are populated from the view class using one LoadDetails() function which is implemented inside the dialog class. I have added an edit box to this dialog. But when ever i am creating any variable of type:
1. CString and attaching it to the editbox through class wizard/manually. It's giving me a message "An unsupported operation was attempted". When i click that msg box the application is getting crashed.
2. CEdit then i am getting the message and the application is crashing.
When i am debugging the application the message box is coming in the DoDataExchange i for that particular entry for that editbox control.
I deleted the entry in the DoDataExchange for the control and just tried to set a its text by using GetDldItem(IDC_EDIT_BLDG_AGE)->SetWindowText("biswa") but again the application is crashing.
For all the cases when its crashing it's giving the error as "Unhandled exception in the app.exe(MFC42D.DLL):0x0000005: Access Violation."
I am really surprised why this is happening for this dialog where as for other dialog there is no problem when i do the same. Also when i am removing the the DDX_Text entry for the control causing the problem the whole application is running fine.
Please help me on this. This is really important for me. If you need any more information then just tell me i can give you the detail history for this.
When the dialog is created in the view class it calls the DoDataExchange function and when it excutes the line
DDX_Text(pDX,IDC_EDIT_BUILDING_AGE,m_BuildingAge) it crashes and when i remove the entry it works fine. Also as i said when directly try to access by it using GetDlgItem then also it crashes.
One more thing i want to say this class was not visible when opened the class wizard. So i deleted the .clw file and agained opened it. That class was then visible but when i selected that i got parsing error for one of entries of DoDataExchange function that is DDX_Dollar(.....). That is why i added entry for this control manually.
I want to have such a thing, because there are points to display on a window. There is a function, responsible for displaying the points. Of course, the function needs coordinates.
First of all, this function gets the point names from the calling program.
THen, the function is looking for fitting coordinates, which should be in a already existing text-file. But it can happen, that the coordinate-file will be empty. Then, the function has to open a notepad-file, where the point-names should be already inserted. The user has to write down the missing coordinates for the point-names.
That's the way. Maybe you have a better idea to do this?
Honnestly, I don't think notepad is the right tool for doing that. Why don't you simply ask for this data in a program of your own (either a separate or even in your existing application) ? Then save the data in a file and its done. Why do you want to use notepad for that ?
I am trying to write a database app using the MDI in MFC, and using ADO to access an MS SQL Server, and I want to be able to do some basic word automation with it. It was working fine, until I tried to add the Word automation.
The problem seems to be that many of the classes defined by importing classes via the class wizard, and including the created file, are already defined by using :
for ADO. I only want a few classes, but class wizard seems to generate a whole host of wrapper classes, which I assume it needs, and which the compiler then tells me have already been defined (but not where, I note...).
I am also #importing msword.olb, mso.dll and vbe6ext.dll.
Is there a simpler way to automate word AND use ADO together? Or even a way that works?!?
Last Visit: 31-Dec-99 18:00 Last Update: 6-Oct-22 9:14