Results 1 to 9 of 9

Thread: Updating DB with bound controls

  1. #1

    Thread Starter
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015

    Updating DB with bound controls

    Can someone give me the syntax for updating a DB with a form containing bound controls? I want all fields updated.

  2. #2
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    I think if they are bound, you will be referencing some sort of recordset. In which case you just do a .Update

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  3. #3

    Thread Starter
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    I tried, I get "insufficient key column information for updating or refreshing"

  4. #4
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    Originally posted by DUNSEL
    I tried, I get "insufficient key column information for updating or refreshing"
    Check your tables to make sure you have a primary key or a unique key set before doing the update.

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  5. #5

    Thread Starter
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    Yeah there's a primary key. I even wiped the form clean and dropped the query again to be sure they were bound. I know the lock type and all other security is correct because I checked that already. Even tried dimming the rs, even though I shouldn't have to with data environment. I don't get it.

  6. #6
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    Hmm, I would have to have a closer look. I don't use the Data environment as I do all my DB work with unbound controls.
    If I get time, I will dabble. Hopefully someone will come up with a answer for you though.

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  7. #7

    Thread Starter
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    It does work, and I'm a moron. The grid needs to be refreshed for the update to show. How can I code that in an event, other than unloading and showing again?

  8. #8
    Frenzied Member Mega_Man's Avatar
    Join Date
    Mar 2001
    Location
    North of England, South-East of Iceland
    Posts
    1,067
    Originally posted by DUNSEL
    It does work, and I'm a moron. The grid needs to be refreshed for the update to show. How can I code that in an event, other than unloading and showing again?
    Does it not have a .Refresh prperty?

    Mega.
    "If at first you don't succeed, then skydiving is not for you"

  9. #9

    Thread Starter
    PowerPoster JPnyc's Avatar
    Join Date
    Oct 2002
    Location
    Manhattan
    Posts
    3,015
    Your sig kills me. Yeah, it does, but either I'm not coding it properly, or refresh won't do it. I'm refreshing in a click event of another form, so I tried frmName.Refresh, to no avail, and then frmName.MSHFlexGrid1.Refresh, with the same results. I'm about to try unload and show, because I'm pretty sure that will work.
    Last edited by DUNSEL; Nov 1st, 2002 at 07:55 PM.

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