|
Hi to all. I have an app for burning optical media using IMAPI2. I'm handeling device changed messge (WM_DEVICECHANGE) so I could track insertion or removal of media in record drive. When media is arrived I try to get type od media wich is inserted (eg. DVD-R). My app reports this error:
"First-chance exception at 0x7c812aeb in MyBurner.exe: 0x8001010D: An outgoing call cannot be made since the application is dispatching an input-synchronous call."
What I'm doing is this:
IDiscFormat2Data->get_CurrentPhysicalMediaType(&mediaType);
Could you please tell me why is this happening and how to fix this? Thanks in advace.
|
|
|
|
|
If you're importing a typelib, you get lots of wrapper functions, which fire off exceptions.
I hate this with a passion, and end up using the raw_XXXX versions, which return a nice friendly HRESULT. It may be that windows needs a bit of time after the instertion of the media for it to be useful - so you may want to check a few times, waiting a couple of seconds between each attempt. If you use the non-throwing access function, you get the chance to do this.
No knowledge specifically of IDiscFormat2Data though...
Good luck!
Iain.
|
|
|
|
|
Thanks Iain.
You are right I'm using wrap functions in this case (although they also return HRESULT).
And yes I've already tried with 'sleep' function after I get my message of media being inserted in optical drive, but no success there.
|
|
|
|
|
Hello,
I am changing the properties od CRichEditCtrl in resource script but the changes are not permanent in nature.
How to upadte it.
Thanks & Regards.
|
|
|
|
|
Dhiraj kumar Saini wrote: I am changing the properties od CRichEditCtrl in resource script but the changes are not permanent in nature.
How so?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
Can u please tell me how to access records from multiple tables in oracle 10g to a SDI application having database support(VC++),using ODBC to access the dsn.
|
|
|
|
|
Only if you can use the search facility provided here on CP with "ODBC" as the search string.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Divya Lalwani wrote: Can u please tell me how to access records from multiple tables...
Can you use a JOIN statement?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
I can access all data from a single table.But If I want to access selected data from multiple tables then I get an error after executing.
ERROR: ORA-00903: invalid table name
DSN Name: om_ebridge.
Oracle User Name: SCOTT
Table Names: Transaction_Master,Transporter_Master,Supplier_Master,Product_Master.
CString CMyebridgeSet::GetDefaultConnect()
{
return _T("ODBC;DSN=om_ebridge");
}
CString CMyebridgeSet::GetDefaultSQL()
{
//return _T("[SCOTT].[TRANSACTION_MASTER]");(works to access data from single table.)
(But ERROR occurs if the below mentioned INNER JOIN is used to access selected data from multiple tables .Can you please help me access data).
return _T("SELECT TRANSACTION_MASTER.TRANSACTION_CODE,TRANSACTION_MASTER.VEHICLE_NO,TRANSACTION_MASTER.OPERATING_MODE,")
_T("TRANSPORTER_MASTER.transporter_name,SUPPLIER_MASTER.SUPPLIER_NAME,")
_T("PRODUCT_MASTER.PRODUCT_NAME,TRANSACTION_MASTER.unit,TRANSACTION_MASTER.Gross_Wt,TRANSACTION_MASTER.Gross_WtTime,")
_T("TRANSACTION_MASTER.Tare_Wt,TRANSACTION_MASTER.Tare_WtTime,TRANSACTION_MASTER.CONTAINER1_TAREWT,")
_T("TRANSACTION_MASTER.CONTAINER2_TAREWT ,TRANSACTION_MASTER.net_Wt,TRANSACTION_MASTER.Challan_no,TRANSACTION_MASTER.Challan_Wt,")
_T("TRANSACTION_MASTER.No_Of_Units,TRANSACTION_MASTER.Calculated_Wt,TRANSACTION_MASTER.Formula1,")
_T("TRANSACTION_MASTER.Formula2,TRANSACTION_MASTER.Formula3,TRANSACTION_MASTER.Formula4,")
_T(" TRANSACTION_MASTER.location_code,TRANSACTION_MASTER.field1,TRANSACTION_MASTER.field2,TRANSACTION_MASTER.field3 ")
_T("from PRODUCT_MASTER INNER JOIN SUPPLIER_MASTER INNER JOIN TRANSACTION_MASTER")
_T("ON SUPPLIER_MASTER.SUPPLIER_CODE =TRANSACTION_MASTER.SUPPLIER_CODE")
_T("ON PRODUCT_MASTER.PRODUCT_CODE=TRANSACTION_MASTER.PRODUCT_CODE")
_T("INNER JOIN TRANSPORTER_MASTER ON TRANSPORTER_MASTER.TRANSPORTER_CODE=TRANSACTION_MASTER.TRANSPORTER_CODE ");
}
|
|
|
|
|
Perhaps you should try a smaller query first until you get the syntax right. After that, add to it.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
When i execute this query in oracle's PLSQL> prompt or in toad the the data from respective tables is displayed.
When accessing data from multiple tables on a single form,is necessary to implement parameterized recordset(ODBC).
|
|
|
|
|
Can I please get help.As I am getting an error ORA-00903 Invalid Table
when I execute the guery in the GetDefaultSQL().
CString CMyebridgeSet::GetDefaultConnect()
{
return _T("ODBC;DSN=om_ebridge");
}
CString CMyebridgeSet::GetDefaultSQL()
{
return _T(" SELECT [SCOTT].[TRANSACTION_MASTER].[TRANSACTION_CODE],[SCOTT].[TRANSACTION_MASTER].[VEHICLE_NO],[SCOTT].[TRANSACTION_MASTER].[OPERATING_MODE],")
_T("[SCOTT].[TRANSPORTER_MASTER].[transporter_name],[SCOTT].[SUPPLIER_MASTER].[SUPPLIER_NAME],")
_T("[SCOTT].[PRODUCT_MASTER].[PRODUCT_NAME],[SCOTT].[TRANSACTION_MASTER].[unit],[SCOTT].[TRANSACTION_MASTER].[Gross_Wt],[SCOTT].[TRANSACTION_MASTER].[Gross_WtTime],")
_T("[SCOTT].[TRANSACTION_MASTER].[Tare_Wt],[SCOTT].[TRANSACTION_MASTER].[Tare_WtTime],[SCOTT].[TRANSACTION_MASTER].[CONTAINER1_TAREWT],")
_T("[SCOTT].[TRANSACTION_MASTER].[CONTAINER2_TAREWT] ,[SCOTT].[TRANSACTION_MASTER].[net_Wt],[SCOTT].[TRANSACTION_MASTER].[Challan_no],[SCOTT].[TRANSACTION_MASTER].[Challan_Wt],")
_T("[SCOTT].[TRANSACTION_MASTER].[No_Of_Units],[SCOTT].[TRANSACTION_MASTER].[Calculated_Wt],[SCOTT].[TRANSACTION_MASTER].[Formula1],")
_T("[SCOTT].[TRANSACTION_MASTER].[Formula2],[SCOTT].[TRANSACTION_MASTER].[Formula3],[SCOTT].[TRANSACTION_MASTER].[Formula4],")
_T("[SCOTT].[TRANSACTION_MASTER].[location_code],[SCOTT].[TRANSACTION_MASTER].[field1],[SCOTT].[TRANSACTION_MASTER].[field2],[SCOTT].[TRANSACTION_MASTER].[field3] ")
_T("from [SCOTT].[PRODUCT_MASTER] INNER JOIN [SCOTT].[SUPPLIER_MASTER] INNER JOIN [SCOTT].[TRANSACTION_MASTER]")
_T("ON [SCOTT].[SUPPLIER_MASTER].[SUPPLIER_CODE] =[SCOTT].[TRANSACTION_MASTER].[SUPPLIER_CODE]")
_T("ON [SCOTT].[PRODUCT_MASTER].[PRODUCT_CODE]=[SCOTT].[TRANSACTION_MASTER].[PRODUCT_CODE]")
_T("INNER JOIN [SCOTT].[TRANSPORTER_MASTER] ON [SCOTT].[TRANSPORTER_MASTER].[TRANSPORTER_CODE]=[SCOTT].[TRANSACTION_MASTER].[TRANSPORTER_CODE] ");
}
Awaiting a reply.
Thanks
|
|
|
|
|
Divya Lalwani wrote: Can I please get help.
Did you try my suggestion here?
Albert Einstein once said “The definition of insanity is doing the same thing over and over again and expecting different results.” You must be willing to try all suggestions no matter how off-the-wall they sound. They might be the exact answer to your problem, but they very well may lead to that answer.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Divya Lalwani wrote: When accessing data from multiple tables on a single form,is necessary to implement parameterized recordset(ODBC).
Are you asking or telling?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I was asking.But, thankfully my problem of access data from multiple tables is solved using the following .
CString CMyebridgeSet::GetDefaultSQL()
{
return _T("[SCOTT].[TRANSACTION_MASTER],[SCOTT].[TRANSPORTER_MASTER],[SCOTT].[SUPPLIER_MASTER],[SCOTT].[PRODUCT_MASTER]");
}
But if I want to ADD Records to database then I get an ERROR saying "Recordset is readonly".
Previously when I was accessing data from a single table adding records was easily possible, I did not get such an error.Can you please help with this issue.
Thanks.
|
|
|
|
|
Divya Lalwani wrote: But if I want to ADD Records to database then I get an ERROR saying "Recordset is readonly"...Can you please help with this issue.
You can't update when multiple tables are involved.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Is there any way by which I can update data in the tables, because adding data to the table is the main purpose.
Thanks.
|
|
|
|
|
Divya Lalwani wrote: Is there any way by which I can update data in the tables...
Yes, update each table separately.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks,but can I please get to know if there is any sample code or a link which helps me with separate updating of tables .
Tkanks.
|
|
|
|
|
There are dozen's here on CP, and thousands available via a simple Google search. Look at the CRecordset class and its various members, like AddNew() , Edit() , and Update() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
If it were me, I'd try the sql out in PL/SQL before I put it into the code. It's much easier to play with that way. Beyond that, I'd make it a stored procedure when I was done.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Sorry it was by mistake....
|
|
|
|
|
Hi,
Main window has a tab control that holds two modeless dialogs(Two tab panes is created) and a button-> on clicking this a modal dialog opens.
Issue:
On opening the Modal dialog box (by clicking button) the main window is disabled and also i can't change the tab panes on clicking the tab control -> this is correct as modal dialog box should not allow other controls to work until it is not closed, but if i click on the controls inside the tab pane (modeless dialog which is opened on tab control during initialization) the modal dialog gets disabled and goes behind the tab pane which is creating problem.
Thanks
|
|
|
|
|
Do you have correct hierarchy of objects? Is tab child of main dialog, modeless dialogs children of tab?
|
|
|
|