|
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?
|
|
|
|
|
I developed a small SDI sample application in MFC. when I run the application and set break point inside CView::OnDraw(), it is not getting called at all. can anyone suggest the reason and clearly explain the significant difference between ondraw and onpaint methods
|
|
|
|
|
MSDN:
OnDraw-
The framework calls this function to perform screen display, printing, and print preview, and it passes a different device context in each case. There is no default implementation.
OnPaint-
The framework calls this member function when Windows or an application makes a request to repaint a portion of an application's window.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Is the only way to call OnDraw() is by calling Invalidate?
Tell me the other ways how i can Call OnDraw()?
Also pls confirm that Is not OnDraw() called by the framework under any circumstances?
If it is called by the framework under any situation describe it.
Thanks in advance.
|
|
|
|
|
OnPaint () is called to draw dialog boxes, OnDraw () is called to draw views. There's no good reason to have two separate methods to do this, and .NET has eliminated this.
Calling Invalidate () right after you've made the change you want to appear in your view may solve your problem.
|
|
|
|
|
I just discovered exactly the same problem. I open a txt file and expect OnDraw to be called automatically but it doesn't. I added UpdateAllViews and setmodifiedflag() to the doc class after loading the file but still nothing. If I alt-tab to another app and then back to my SDI app OnDraw still doesn't get called. Is it something to do with the view being embedded in the Cmainframe as the only view ?
I solved it by putting a WM_PAINT handler in the view and that performs as expected - seems odd though to have the OnDraw function in there now.
|
|
|
|
|
ondraw gets called when u draw something on the dc and call invalidate();
next if u have also mapped wm_paint message the ondraw method will never be called.
any one of them must be used..........
best regards
|
|
|
|
|
how to load bitmaps or icons on a list box control?
thanks in advance
|
|
|
|
|
|
See here.
"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 suppose that
The Image List Box shows a list of images. It is not possible to display text.
clashes with his previous requirements.
On the other hand, if the requirements changed, I should edit my 'repost' reply.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|