Results 1 to 7 of 7

Thread: What Am I missing?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    20

    What Am I missing?

    Successfully wrote some VB Web Form sample code that displays a custom paging datagrid. "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatagridclassvirtualitemcounttopic.asp"

    The data is internally generated. When I try to substitute a SQLdatareader to populate the table, my sqldtatareader instance is lost after the Postback to goto the next page. I only load the table at the inital page load. IF I am not doing something wrong, whats the point of paging if you have to reload the data AND always load the same table? Would a dataset persist after the postback?

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    Not sure about what is going on with all that, but datasets do seem to work fine.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2003
    Posts
    20

    Hmm

    I have just rewritten to use a Oledatadapter, am using a datatable, same thing:

    Object reference not set to an instance of an object.

    It just seems to me that once a postback is done, I lose the dataset instance. Is this right?

  4. #4
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    How about a little code? That Object Reference business, at least in my case, means I've done something wrong.

  5. #5
    Member
    Join Date
    Feb 2003
    Posts
    40

    Cant get to it

    Hi, I am TomACMan(I have two logins, 1 for work and one for home) I am at work now, and my code is on my other computer.

    I will try to regen it here and post

    BTW I got issues with trying to do a simple load, see my other post.

    Thanks

  6. #6
    Member
    Join Date
    Feb 2003
    Posts
    40

    Thumbs up Not really a problem

    I found out he magic thing to do is to create a session variable to save the dataset. Works fine now. But would hate to store all that data in memeory. Most efficient would be to load only what you need--Page at a time SQL reads. need to figure that out next.

  7. #7
    Member
    Join Date
    Feb 2003
    Posts
    40

    Thumbs up Not really a problem

    I found out he magic thing to do is to create a session variable to save the dataset. Works fine now. But would hate to store all that data in memeory. Most efficient would be to load only what you need--Page at a time SQL reads. need to figure that out next.

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