Results 1 to 8 of 8

Thread: Loading a form (HELP! ITS URGENT)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    176

    Loading a form (HELP! ITS URGENT)

    Hi
    This might be too basic

    i have two mdi childs: frm1 and frm2.
    both get their data from the same table in ms sql. i first load frm1 and then frm2. when frm2 unloads i want the changes made in it to be shown in frm1.
    load frm1 in the unload event of frm2 gives error. i have no clue how to do this.
    i have also tried refresh but the changes don't get updated.

    thanks in anticipation.....

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Pakistan
    Posts
    436
    Refresh your recordset in form GotFocus Event check it.

  3. #3
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    to load new data u have to call Recordset.Requery method of frm1 on frm2 unload.

    this is what i can say without viewing code. If u can post ur code that will easy to find exact problem & solution.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    176
    i tried requery too.
    it works fine when the command type is a table. but when i use a stored procedure requery too gives an error.

    to show u the code i'll have to show the whole app.
    btw, frm1 has a datagrid populated by the sp n i want the fields in the datagrid refreshed

  5. #5
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    let me guess

    error should be 'Operation not allowed when the object is open' or something like that.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    176
    it doesn't stop or give an error on the refresh query but there are no changes made. if u click on that record again u get a eof or bof error. the datagrid is not refreshed on load, refresh (or form or grid) requery

  7. #7
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424
    r u sure u r refreshing recordset which is bound to datagrid.

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Aug 2004
    Posts
    176
    as i said my command type is a stored proc.
    the command is given in a DataEnvironment

    so i have tried :
    DataEnvironment1.rscmdApproved.Requery

    (.refresh is not an option with the recordset)

    but i get the error
    "no value given for one or more required parameters"

    the sp has no in/out param. it is a simple select query
    (but i cannot use the table as a command type)

    any ideas.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width