1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Refreshing Datagird In Vb Using Recordset Object

Discussion in 'Programming' started by vijaykoul, Apr 2, 2005.

  1. #1
    Hi,

    I am trying to refresh the datagrid value as soon as it is edited
    i.e. I want the edited values to be displayed in the datagrid as soon as I save them.
    To do this I have to refresh the recordset object.
    Since there is no refresh method associated with the recordset object, how shud i do it (I am not using ADODC)
    Everything is being done thru code.

    Needed Urgently
     
    vijaykoul, Apr 2, 2005 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Maybe I've only written a few thoussand lines of code for vB and I'm not getting it. But if you explain a little more, there is nothing that can't be done.
     
    noppid, Apr 2, 2005 IP
  3. vijaykoul

    vijaykoul Guest

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i am using a datagrid which fetches values from the database and these values r displayed in the datagrid columns
    i want to edit a record
    what i do is that i take the pointer to that particular record and then click on edit button
    what that does is that, it fetches the first column of the selected record into the text box.
    i make some changes and then click on the save button
    what i want is that the new updated value of that record should be refreshed there only without having me to close the form and then open it again to c the changes.

    how can i do

    i am not using any ADODC control. i am using plain recordset object
     
    vijaykoul, Apr 3, 2005 IP
  4. lovethecoast

    lovethecoast Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    As with pretty much anything programatic, there are multiple ways of accomplishing what you're wanting to do -- I can think of three or four off the top of my head.

    A big part of it boils down to how complicated you want the code to be, how often this script will be accessed, and how many different pages will be doing something similiar... In other words, do you need speed and stability, just stability or code-reuse.

    Once you determine that, it'll help with the method of coding you end up using. In your case, I would pick up a book dealing with the ADO object. There will more than likely be a case exactly like what you're asking here.

    There are also a multitude of websites dealing with this type of thing, and some places that will even do all the coding for you (think experts-exchange.com).

    What you're asking for isn't something someone can just type up 10 lines of code and *poof* you're done -- it requires forethought and some time.


    S
     
    lovethecoast, Apr 30, 2005 IP