|
MFC, STUDIO 2008, ADO
Edited columns into control CListCtrl.
How do to save changed fields into table?
Below fragments the code:
_RecordsetPtr pRecordset;
pRecordset->Open ((IDispatch *) pCommand, vtMissing,
adOpenForwardOnly, adLockOptimistic, adCmdUnknown);
ListView_SetExtendedListViewStyle(m_listCtrl,LVS_EX_GRIDLINES | \
LVS_EX_FULLROWSELECT | LVS_EX_TRACKSELECT);
CListCtrl* m_pListCtrl_3;
m_pListCtrl_3 = (CListCtrl* ) GetDlgItem(IDC_LIST1);
m_pListCtrl_3->SetItemText(0,1,”Test”); // to place into column=1 of
row = 0
of control CListCtrl text string ”Test”
How it to save into table database Access?
Below show 3 variants - all Uncorrecrly:
pRecordset->UpdateBatch(adAffectAll); // not Updated into table!
pRecordset->UpdateBatch(adUpdate); // error C2664: 'Recordset15::UpdateBatch' : cannot convert parameter 1 from 'CursorOptionEnum' to 'AffectEnum'
pRecordset->Update(adUpdate); not Updated into table!
pRecordset->UpdateData(TRUE); // error C2039: 'UpdateData' : is not a member of '_Recordset'
pRecordset->Update(row);
|
|
|
|
|
Hi,
can you pls explain how to get the mData?
mData = ((A2Op & 0xff) << 12) + ((A1Op & 0x0f) << 8) + (Num & 0xff)
A1op = 0x3
A2op = 0x07
Num = 5F
thanks
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
okay, i will check 1st.
thank you
|
|
|
|
|
Hi David,
can you pls check if my solution is correct?
thanks a lot...
mData = 7 3 5 F
mData = 0000 0111 0011 0101 1111
Formula:
mData = ((A2Op & 0xff) << 12) + ((A1Op & 0x0f) << 8) + (Num & 0xff);
Given:
A2op = 0x07
A1op = 0x3
num = 5F
Solution:
Alg2op 0000 0000 0000 0000 0111
0000 0000 0000 1111 1111
------------------------
& 0000 0000 0000 0000 0111
------------------------
<<12 0000 0111 0000 0000 0000
Alg1op 0000 0000 0000 0000 0011
0000 0000 0000 0000 1111
------------------------
& 0000 0000 0000 0000 0011
------------------------
<<8 0000 0000 0011 0000 0000
num 0000 0000 0000 0101 1111
& 0000 0000 0000 1111 1111
------------------------
0000 0000 0000 0101 1111
|
|
|
|
|
what type are your numbers? You're only showing 20 bits. INT is 32 bits. CHAR is 8. SHORT is 16. All these values are minimums.
The math is right, though.
|
|
|
|
|
thanks
|
|
|
|
|
Hi All,
i want to add Radio Buttons in a Propertypage which contains many property sheets. i have been told that it is not possible..
if that is the case, can anyone explain me the actual reason behind it?
thanks,
Rakesh S
|
|
|
|
|
Property page containing property sheets!!!
No wonder you don't see any radio buttons.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
i was able to add radio buttons and it is not working..
the application got struck...
may i know the reason sir?
thanks,
Rakesh S
|
|
|
|
|
A property page is like a dialog.
You can place any controls on it.
You're application becoming "struck" would be because of some other reason.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
hi, i wrongly posted..
i wanna add radio buttons in a property sheet which has got many property pages..
thanks,
Rakesh
|
|
|
|
|
Rakesh5 wrote: i wanna add radio buttons in a property sheet...
Why? What logical purpose does that serve?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I'd developed an internet explorer sidebar plugin (with BHO). The sidebar is created and it is working fine.
My issue is that when I closed the sidebar from my browser window, it appears to be closed but the instance is running in background and will exit when I close my browser window/tab.
Is there anyway to stop it from running in background?
thanks in advance
|
|
|
|
|
What do you mean by the instance running in the background.
If you mean unloading the BHO that happends when IE is closed or the particular tab is closed.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thanks for the reply
instance running in background means, the BHO instance is not closing when I close the sidebar from my browser. It closes after I closing the browser window/tab.
I need to unload the BHO instance when I close the sidebar plugin in my browser not the main browser window.
|
|
|
|
|
When you mean "close the sidebar", I assume you mean "clicking the X button to make it go away". If I was writing explorer, this does not actually close the sidebar, it just makes it invisible.
Imagine if it did it differently, and it took a noticable time to load / close up a BHO. You'd be complaining that "I shut down the FoozleBar, and it takes aaaaaages to go away". This way, the penalty is only paid when the FoozleBar is first opened, and once when explorer is closed.
Though I imagine this is a pain when you're developing it, it seems like a good idea for 99% of normal use. Does the ISideBar (making this up) interface have a ISideBar::BeingShown / ISideBar::BeingHidden member function you could use instead of Release() to do some tidying up?
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
You are absolutely correct Ian, 'closing the sidebar with the X button' only makes it invisible.
Let me try with your suggestions.
Thank you!
|
|
|
|
|
seems to be nothing available for that
|
|
|
|
|
Hi all,
I have to develop a TCP server using MFC.
Is there any limitation on the number of clients to
be connected to the server.
Regards,
Sunil Kumar
|
|
|
|
|
sunilkumar.d wrote: Is there any limitation on the number of clients to
be connected to the server.
Yes (unsless you have the ICPM , I nfinite C omputing P ower M achine... ).
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]
|
|
|
|
|
But can we know the approximate number of clients?
Regards,
Sunil Kumar
|
|
|
|
|
You can see the number of clients online at the top left corner of this screen.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
You, as the server designer, should know about.
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]
|
|
|
|
|