|
The database is open and after that close.
but what is wrong ?
i have this message: "SQL : statement too long"
Bravoone
|
|
|
|
|
Sounds like the SQL statement is too long.
You still haven't posted any code that would either work properly or show the problem so
that's the best guess I have.
The database is open, ok. What about the recordset?
|
|
|
|
|
Dear Sirs;
How can I send my output from Visual c++ treatment by e-mail like a joined piece to someone like in ACCESS
It means ;I don't to print out but to send by e-mail, what to do .
I learn ,y self
|
|
|
|
|
Hi
I have CMyComboBox derived from CComboBox.
Using it in CMyFormView in VC++6/MFC/Win98/2K project.
In my invoice form, I need to have multiple combos with 40000+ products.
Virtual list for combo can make it possible. (multi column virtual list for combobox)
What I am trying to achieve is :
- show dynamically created CListCtrl* m_pMyListCtrl (with LVS_OWNERDATA) instead of default ListBox of CMyComboBox
- that CListCtrl in virtual mode should get data from CMyFormView
- same member of CMyFormView (CArray of products) used to show data in virtual list (m_pMyListCtrl)
Problem is how to pass-on LVN_GETDISPINFO message from m_pMyListCtrl to CMyFormView so as to get item info (m_pMyListCtrl is dynamically created virtual list control - member of CMyComboBox).
I truly appreciate any idea or help.
Thanks
Anand
|
|
|
|
|
overide the WindowProc() of the formview inside it check
1. message is WM_NOTIFY
2. if so check wParam is LVN_GETDISPINFO
3. if so cast the lparam to LPNMLVDISPINFO
nave
|
|
|
|
|
Thank you for helping.
In fact, I am trying to use list of following multi-column combo control in virtual mode.
Multi column Combo box (2) (CodeGuru Article)
http://www.codeguru.com/cpp/controls/combobox/multicolumncombos/article.php/c1819/
What I tried is:
1. Added LVS_OWNERDATA style to defaultListControlStyle
2. Added my new view (CFormView)
3. Added custom control in view and subclassed (as suggested in article) for Multi column Combo
Still I am unable to pass-on LVS_GETDISPINFO to my form view.
(i.e. I could use list of this combo in normal mode in my form
but unable to use it in virtual mode)
Please help...(Urgent help needed).
How to pass-on LVS_GETDISPINFO to my form view ?
I truly appreciate any idea/help.
Anand
|
|
|
|
|
can u tell me the step u used to create the virtual listctrl.
I mean who is the parent of the list ctrl. U should do the procedures that i said in the previous post in that parent window
nave
|
|
|
|
|
Naveen, Thanks a lot for helping.
What I tried is:
1. Downloaded sample from following article and unzipped
Multi column Combo box (2) (CodeGuru Article)
http://www.codeguru.com/cpp/controls/combobox/multicolumncombos/article.php/c1819/
2. Removed code which displays Multi-column Combo in toolbar (from Mainframe.h and Mainframe.cpp) as I don't need that
3. Added LVS_OWNERDATA style to defaultListControlStyle
4. Created new dialog resource (Set style to Child and Border None), and
added custome control IDC_CUSTOM1 (class MultiColumnComboBox)
5. Created new view class CMyTestView (derived from CFormView)
5. Added protected member to CMyTestView ->> CMultiColumnComboBox m_combo;
6.
void CMyTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// subclassed custom control (as suggested in article)
m_combo.SubclassDlgItem(IDC_CUSTOM1);
// add columns to list
// do not insert items in list (as it is virtual)
CListCtrl* pList = m_combo.GetListCtrl();
pList->InsertColumn(0, _T("Col 1"), LVCFMT_LEFT, 100);
pList->InsertColumn(1, _T("Col 2"), LVCFMT_LEFT, 100);
}
8. To make view class as parent of list control,
In CMultiColumnComboBox::OnInit() (where ListControl is created)
I replaced following line
// if( m_pListCtrl->Create(WS_BORDER|WS_CHILD|defaultListControlStyle, Crect(0,0,0,0), GetDeskTopwindow(), IDLISTCTRL) )
with
if( m_pListCtrl->Create(WS_BORDER|WS_CHILD|defaultListControlStyle, Crect(0,0,0,0), this->GetParent(), IDLISTCTRL) )
7. Then tried as you suggested in CMyTestView.
In view, I am getting LVN_GETDISPINFO notification
I am setting item text
but list is not getting even single item
I am unable to get data through LVS_GETDISPINFO to list of combo in form view.
(i.e. I could use list of this combo in normal mode in my form
but unable to get data from view in list of combo in virtual list mode)
Please help...(Urgent help needed).
I truly appreciate any idea/help.
Anand
|
|
|
|
|
can u show me the code u used in the CMyTestView for getting the LVN_GETDISPINFO notifications and setting the text..?
Also i hope u have inserted two columns in the list ctrl...
nave
|
|
|
|
|
pls asure CListCtrl::SetItemCountEx() has been called with proper value
nave
|
|
|
|
|
Thanks Naveen for taking me into right direction.
I did forget to set count for list with SetItemCountEx()
I did it and now I am able to show 100000+ items in the virtual list of CMultiColumnComboBox.
Thanks a lot for helping me.
One Question..?
I have custom control IDC_CUSTOM1 in dialog resource of my view.
I have subclassed IDC_CUSTOM1 to CMultiColumnComboBox
In my project value for IDC_CUSTOM1 is 1005
In MultiColumnComboBox.h value for IDLISTCTRL is 0x3E8 (i.e. 1000)
View gets LVN_GETDISPINFO message directly from IDLISTCTRL
(i.e. with control-id == IDLISTCTRL)
But I need LVN_GETDISPINFO with id of custom control IDC_CUSTOM1
(i.e. with control-id == IDC_CUSTOM1)
How to modify CMultiColumnComboBox::ParentWndProc or MultiColumnComboBox::ListCtrlWndProc so that I get LVN_GETDISPINFO with ID of parent custom control and not of ListCtrl ?
So I can distinguish LVN_GETDISPINFO message in case of multiple combos. Because I need to use multiple combos IDC_CUSTOM1 , IDC_CUSTOM2, IDC_CUSTOM3 etc. and each of them in virtual mode.
Thank You.
Anand
|
|
|
|
|
i think thats not possible. but there is turn around
I hope u use a listctrl derived class object as virtual list(if not so, derive a class from clistctrl and use bject of that class as virault list )
Add a member variables in that class say m_nParentComboId;
After u create the listctrl for a combo, set the correponding combos id into listctrl member variable(m_nParentComboId).
So when ever u get a LVN_GET... message. check the m_nParentComboId to find which combox is associated with the list ctrl
nave
|
|
|
|
|
Nice idea to add m_nParentComboId for parent combo identification. I may do that.
But One thing...
In CMultiColumnComboBox::OnInit(), after creating list control, with ::SetWindowLong statement... it stores pointer to CMultiColumnComboBox as a long.
::SetWindowLong( m_pListCtrl->m_hWnd, GWL_USERDATA, long(this) );
(Whenever LVN_GETDISPINFO message comes in view from list ctrl)
Can I get that value and use that value to identify control id or parent combo ?
Thanks for all your help. I learnt nice tricks for handling virtual list.
Anand
|
|
|
|
|
That too is a good idea. Later u can use GetWindowLong() to get retrive the pointer...
Where r u from anand?I am from kerala->India
nave
|
|
|
|
|
Naveen, Thanks a lot for helping.
You always answered nicely, regularly and promptly.
Are you working for CodeProject or what ?
I am from Vadodara (Gujarat-India).
Thanks again.
Anand
|
|
|
|
|
no no .. I am working in a company in kerala itself(NeST). Answering in CP is just a hobby...
nave
|
|
|
|
|
Naveen, Thanks a lot for helping.
You always answered nicely, regularly and promptly.
Are you working for CodeProject ?
I am from Vadodara (Gujarat-India)
Thanks again.
Anand
|
|
|
|
|
Hi,
I used the following function to display HtmlHelp files.it is working fine in non-unicode but it is not working in unicode.i don't no why?anybody can help me.
HtmlHelp(m_hWnd,_T("C:\Working\projects\application.chm"),HH_DISPLAY_TOC,NULL);
E-Ramu
|
|
|
|
|
Ramu.e wrote: it is working fine in non-unicode but it is not working in unicode
What is it doing / not doing in the Unicode build?
Ramu.e wrote: C:\Working\projects\application.chm
I assume you typed this from memory? As the directory paths should be seperated with '\\'
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
I guess your _T macro doesnt do the right things in Unicode. Make the path in an own string.
Greetings from Germany
|
|
|
|
|
I have fired a query on to a webservice using the GET method. Now the GET method has some limitations relating to the size of the query and the data that could be passed with it. So I thought about shifting to the use of POST method. But the POST method fails when trying to connect to the webservice returning an error : 500 Internal Server Error. Any ideas how can I resolve the problem of using the POST method with the Kerberos authentication enabled.
PS: I tried googling for a solution and found this link[^] which says to disable the authentication and this is what I don't want to do as this would create a security hole. (I use MSXML2)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Dear All,
I need to find number of device drives (harddisk partitions) in a host ?
Is there any API to get this information ?
How can i do this ?
Kindly help me.
Thanks.
|
|
|
|
|
Sakthiu wrote: I need to find number of device drives (harddisk partitions) in a host ?
Look up GetLogicalDriveStrings , GetLogicalDrives .
|
|
|
|
|
Sakthiu wrote:
Is there any API to get this information ?
CNMPDriveClass[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
hi
i am facing memory & handle problem when my application invoke IXMLDOMDocument::load(), even i have used IXMLDOMDocument::Release() each time when i load new xml file, but its continuously increasing the memory and handle usage,
your help will be greatly appreciated
Thanks & Regards
neeraj
neeraj
neeraj
|
|
|
|