Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Larree

    Problem with the m_strFilter

    Hi, The database field format that I have used for ID Number is text. However when keying in the value for dlg.m_IDNumber, it contains numbers. Is this ok? Or do I have to switch to integer format in the specification for the database field format. However if I switch to integer, then it s not...
  2. Larree

    Problem with the m_strFilter

    Hi all, I am using ODBC for my program. I want to specify a filter for the records in my MS access database. When my code for performing teh filter is as follows: m_ParticipantSet->m_strFilter = "PartName = '" + dlg.m_PartName + "'&quot...
  3. Larree

    Retrieveing data from Dalog box

    Hi all, Thanks for the advice......I think I have gotten it :-) Cheers Larree
  4. Larree

    Retrieveing data from Dalog box

    Sorry for being so confusing pete.......The dialog box is originally open. By clicking the "OK" button I actually start a timer. I record the start time as Timing1. The timer continues running all the while. Then a sort of tag is supposed to be read and it triggers another function in...
  5. Larree

    Retrieveing data from Dalog box

    Hi Pete, I have no intention of opening the dialog box. If I m not wrong, using DoModal() will open the dialog box on the screen right? I only wish to retrieve a value from the CTimeDlg dialog and not open the entire dialog. So is the code you have shown above still workable?
  6. Larree

    Retrieveing data from Dalog box

    Hi, I am not too sure if I am answering what u r asking Rick. So please correct me if I m wrong. The value that I want to retrieve is the value of the time when the "OK" button is clicked in the CTimeDlg dialog box. On "OK" the CTime Timing1 variable is assigned the current...
  7. Larree

    Retrieveing data from Dalog box

    Hi Rick, I am actually trying to retrieve a value Timing1 from a dialog box named CTimeDlg. The dialog is ok. It is just that I want to import this value to do calculation in a function in CMainFrame. However using the above code, I cannot get the desired value. In the CTimeDlg, the correct...
  8. Larree

    Retrieveing data from Dalog box

    Dear all, I m trying to retrieve a value Timing1 from a dialog box named CTimeDlg to my CMainFrame. The code that I use is as follows: CTimeDlg Timedlg; CTime STime = Timedlg.Timing1; CTime Now = CTime::GetCurentTime(); CTimeSpan Interval = Now - STime; CString Timing =...
  9. Larree

    Converting CString to CTime

    Hi Pete, Actually I have already used ODBC for most part of the program so it is not possible for me to switch to ADO now. I actually receive a CTime object value. Then switch to CString to store in my database since I make use of the AddString() function to add to an array I constructed.Then I...
  10. Larree

    Converting CString to CTime

    Dear all, I have declared a CTime object as CTime Timing. I believe this is timing in seconds. I later convert it to a CString object using Timing.format("%H:%M:%S") This gives the timing in terms of Hours : Minutes : Seconds I then store it in a daatbase. I wish to extract this...
  11. Larree

    Problem of redundant records

    Hi all, I am facing a problem for my program. Basically I intend to update my database each time an event occurs. However I want to eliminate redundant records as in if a particular identity is already in my record for today, it must not appear again. Ut is ok if it appears tomorrow since the...
  12. Larree

    while Loop problem

    Yup that's the problem. Thanks!
  13. Larree

    while Loop problem

    Thanks....I guess that is the problem. However I need to keep the while loop coz I want the same data to be in every entry of my database. However, even after removin the MoveNext() command, I still encounter the same error message " attempt to update or delete failed." Compiling...
  14. Larree

    while Loop problem

    Hi all, I encountered the following problem. Code looks ok but and no errors when I compile. But when I activate the function an error is generated saying that attempt to update or delete failed. The code is as follows: Timing1 = CTime::GetCurrentTime(); if( m_pCapturedResults.IsOpen() ==...
  15. Larree

    How to fill a combobox with data from my database?

    Hi all, I am facing a problem. How do u fill a combobox with data from my database? I am looking to fill all the participants name in a race into a combo box. Then when I select the participant's name, all his particulars will also be displayed. I am using dialog for this. So do I put the code...
  16. Larree

    Displaying contents of database in a combobox of a dialog box

    Hi Thanks for the advice!!! [smile2]
  17. Larree

    Displaying contents of database in a combobox of a dialog box

    Hi, I think I am calling from within the dialog class so I do away with the GetDocument().My code now reads BOOL ViewRecordsDlg::OnInitDialog() { // Fill the combo box with all of the names pDoc->m_viewrecordSet.m_strSort = "Name"; if (!pDoc->m_viewrecordSet.Open()) return...
  18. Larree

    Displaying contents of database in a combobox of a dialog box

    Hi, I am a relatively new MFC programmer and I have the following problem. In adding a second recordset to my dialog box, I want to add a combo box to list the names of all that is contained in my database. I used the following code m_pSet = &GetDocument()->m_viewrecordSet; m_pSet->m_pDatabase...
  19. Larree

    How to open dialog box from a single document?

    Hi qednick, I am juz assuming it is looping because when I run the exe file, the window opens. Then when I click the button to open the dialog testdlg, the whole window hangs and I have to alt+ctrl+delete to end the program.I have checked and found that the resource ID is valid. But I do not not...
  20. Larree

    How to open dialog box from a single document?

    Hi, I am a new user in Visual C++ 6.0.Using MFC, I created a single document application. From the application I wish to click a button to open a dialog box. The following is the code I used: void CTest1Doc::OnButton1() { TestDlg testdlg; int result = testdlg.DoModal(): } It seems that it...

Part and Inventory Search

Back
Top