Thank you. Your suggestion works. I got both state codes 28000 and IM006 returned when an invalid user name or password is entered. Elizabeth
ElizabethC
Posts
-
Specified driver could not be located due to system error 5 -
Specified driver could not be located due to system error 5But there is no return code m_nRetCode for invalid name and password. Elizabeth
-
Specified driver could not be located due to system error 5I am testing my application on different client machines. The application got into an infinate loop when trying to open the database using ODBC. The error message says "Specified driver could not be located due to system error 5...". I am trying to track it down to exit the application when this occurs, but need help figuring out the value at m_nRetCode. There is a bunch of them from MSDN library. I tried catch(CDBException* e) { //exit if not invalid user name and password if (e->m_nRetCode==AFX_SQL_ERROR_API_CONFORMANCE || e->m_nRetCode == AFX_SQL_ERROR_CONNECT_FAIL || e->m_nRetCode == SQL_INVALID_HANDLE || e->m_nRetCode == AFX_SQL_ERROR_ODBC_LOAD_FAILED || e->m_nRetCode == AFX_SQL_ERROR_SQL_CONFORMANCE) { AfxMessageBox("Database Logon Error - " + e->m_strError); exit(1); return NULL; } else AfxMessageBox("Database Logon Error, invalid user name or password - " + e->m_strError); goto TRY_AGAIN; } But none of these is the correct one. -Elizabeth Elizabeth
-
SetFieldDirty QuestionI am having problem setting a dirty flag to a record (CRecordset). I am adding controls to the interface so that no updating to the database is allowed if the form has already been approved. So I did something like the code below. However, I always get the dialog saying "field is still dirty, do not know why". I am not expecting to see this dialog. m_pSet->Edit(); m_pSet->UpdateData(TRUE); if (m_pSet->IsFieldDirty(NULL)) { If (m_pSet->m_is_approved == "1") { //reset the dirty flag m_pSet->SetFieldDirty(NULL, FALSE); AfxMessageBox("no updating is allowed on an approved application."); if (m_pSet->IsFieldDirty(NULL) ) { AfxMessageBox("field is still dirty, do not know why"); } } } m_pSet->Update(); Elizabeth
-
How do I know if I have MAPI installed for Lotus Notes mail client?I am starting to add an email interface to the MFC application. How do I know if I have MAPI installed for Lotus Notes mail client? Elizabeth
-
Need help sending email out from MFC application using Lotus Notes mail serverI need help implementing an interface to send email out from a MFC application using our Lotus Notes mail server. I tried running the sample application NPP came with the Visual Studio. It always came up with an Outlook dialog. But I want to use our Lotus Notes mail server. Can you tell me where to add the mail server information. By the way, I looked at the sample code, there was no custom code for OnFileSendMail. Elizabeth
-
Help with Using HTMLHelp Topic TemplatesI need help Using HTMLHelp topic templates. I am trying to find out how to use topic templates on a HTMLHelp project so the style will be consistant. Can you point me to some direction? I have researched from the HTMLHelp help file and the web. I found information on sample codes of templates, but I do not see any example on how to use the templates. Elizabeth
-
Can you suggest some software to create a help file for my application?Thank you all. HTMLHelp fixs better for us since the files can be used cross platform. We are sharing the help files with both Windows and Web applications. Elizabeth
-
Can you suggest some software to create a help file for my application?Do you have any preference over the two products WinHelp and HTMLHelp? Elizabeth
-
Can you suggest some software to create a help file for my application?Can you suggest some software to create a help file for my application? I need my help file to have a look as in the VC++ Help such as Content, Index, Search. This help file should allow me to embed graphics/screen shots. I have looked into htmlhelp, but i am not sure this is the best tool. Elizabeth
-
A CxImage Problem (CXX0030: Error: expression can not be evaluated)Here is the function. Before I made the changes at Project Settings to use the CxImage class, I was able to see the values from each field at m_pListSet. Now all I am seeing is "CXX0030: Error: expression can not be evaluated". void CDeliveryForm::LoadDeliverableList() { m_comboDeliverable.ResetContent(); if (!m_pListSet->IsBOF()) { m_pListSet->MoveFirst(); while (!m_pListSet->IsEOF()) { if (m_pListSet->m_ROUTE_TO_WAM_DATE != 0 && m_pSet->m_ACCEPTED == "1") m_comboDeliverable.AddString(m_pListSet->m_TITLE + " (deliverred)"); else m_comboDeliverable.AddString(m_pListSet->m_TITLE); m_pListSet->MoveNext(); } } m_comboDeliverable.AddString("NEW"); if (!m_pListSet->IsBOF()) { int target_record = 0; //get to the deliverable if (m_pDoc->m_deliverable_id != "") { m_pListSet->MoveFirst(); while (!m_pListSet->IsEOF()) { if (m_pListSet->m_DELIVERABLE_ID == m_pDoc->m_deliverable_id) break; target_record ++; m_pListSet->MoveNext(); } } //reset to 0 if no record found if (m_pListSet->IsEOF()) target_record = 0; //set selected item in list m_comboDeliverable.SetCurSel(target_record); m_pListSet->Move((target_record+1), SQL_FETCH_ABSOLUTE); } } Elizabeth
-
A CxImage Problem (CXX0030: Error: expression can not be evaluated)I am starting getting this "CXX0030: Error: expression can not be evaluated" from the debugger after configuring my application to use the CxImage class. The error message is at the Value column on all recordset fields at the Variables window. Now I am not able to see the values in the recordset to debug the application. Please help. Elizabeth
-
Can resize an image to a smaller size using CxImage?I got it. Thank you. Elizabeth
-
Can resize an image to a smaller size using CxImage?I do not see CxImage forum in CodeProject. Can you tell me the website? Elizabeth
-
Can resize an image to a smaller size using CxImage?How can I resize an image to half of its size using CxImage? I am having problem findingt the function. Elizabeth
-
Need help setting project to use CxImageI just found out how to generate the lib files. I have to select a Configuration before the build. Elizabeth
-
Need help setting project to use CxImageI have studied the instruction setting up a C++ project to use CxImage at http://www.codeproject.com/bitmap/cximage.asp. But I still need help to generate/find the library files. I downloaded the source files and did a build on the project. But I do not see the library files stated in the instruction, for example, jpeg.lib. Please help. Elizabeth
-
Tooltip lost after setting state to TBSTATE_HIDDENThe application lost the toolbar tooltips after the SetState statement m_wndToolBar.GetToolBarCtrl().SetState(ID_INBOX, TBSTATE_HIDDEN) If I comment this line out, the tooltips comes back. I tried to get the tooltips back by adding the following line m_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS) But this does not work. The tooltips are not showing up at the toolbar. Elizabeth
-
LoadBitmap returns NULLI got it working with the bitmap file with the return handle: CString file_name = "c:\\gis\\aspjpeg\\file_new.bmp"; m_hBitmap = (HBITMAP)LoadImage(NULL, file_name, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); DWORD error = GetLastError(); However, it the handle is NULL when loading a JPEG file: CString file_name = "c:\\gis\\aspjpeg\\root.jpeg"; // CString file_name = "c:\\gis\\aspjpeg\\file_new.bmp"; //line #1 m_hBitmap = (HBITMAP)LoadImage(NULL, file_name, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); DWORD error = GetLastError(); Do you know how to load a JPEG file into the picture control? Elizabeth
-
LoadBitmap returns NULLI have just looked up LoadImage(). It also requires a instance handle. Can you suggest what HINSTANCE should I use in a CDialog class? The picture will be displayed at the picture control which is a CStatic control. Elizabeth