Results 1 to 24 of 24

Thread: Datagrid help needed

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278

    Datagrid help needed

    How do i populate a datagrid using a MS Access database table?

    i have established a connection to the database and have a recordset made........then what do i do to have the data shown in the datagrid cells?

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    After initializing your connection obj and filling your dataset , do this .
    VB Code:
    1. DataGrid1.DataSource = ds.Tables(0)
    Last edited by Pirate; May 21st, 2003 at 09:30 AM.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by vector9
    How do i populate a datagrid using a MS Access database table?

    i have established a connection to the database and have a recordset made........then what do i do to have the data shown in the datagrid cells?
    Wait , there is no recordset obj in ADO.NET . Are you working with the old database in VB6 .

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    sorry but i dont really know what exactly to say.......but

    i have objRS as new ADODB.Recordset

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by vector9
    sorry but i dont really know what exactly to say.......but
    i have objRS as new ADODB.Recordset
    That's what I thought . Hmm , why don't you try ADO.NET , easier , faster , lost of nice features ..etc . ??

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    could you provide me with a link of where i can get this.... it is just a download right?

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by vector9
    could you provide me with a link of where i can get this.... it is just a download right?
    a silly question : are you using VB.NET ?

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    of course.

    the reference i add is that of Microsoft ActiveX Data Object Library 2.7

  9. #9

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    so i take it since i have vs.net it came with ado . net?

  11. #11
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by vector9
    so i take it since i have vs.net it came with ado . net?
    Exactly , read more about it to make use of the great features it offers .

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    ok thanks man

  13. #13
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    since i cannot really grasp ado.net really quick.......is there any way using ADO 2.7 like i have been and populate a datagrid with the contents of a table?

  15. #15
    Lively Member
    Join Date
    Oct 2002
    Posts
    67
    I recommend ado.net from novice to pro. For anyone completely new to datasets. My favorite of my 4 ado.net books

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2002
    Location
    Cecilton, MD USA
    Posts
    278
    sorry but i dont have time to go get a book............ know of any really good tuturials? that actually walk you through the code.

  17. #17

  18. #18
    New Member
    Join Date
    May 2002
    Posts
    14
    there is a really good ado.net site here:
    Click here

  19. #19
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Do not click on the link that Booya05 provided. It is a Javascript popup page.

  20. #20
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    i got a few examples of using ado.net on my website. Take a look. http://www.vb-tech.com
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  21. #21
    New Member
    Join Date
    May 2002
    Posts
    14

    Thumbs down

    Vector9 is an idiziot.

  22. #22
    New Member
    Join Date
    May 2002
    Posts
    14
    Don't cry
    Don't raise your eye
    It's only teenage wasteland

    Sally take my hand
    And travel south crossland
    Put out the fire
    And don't look past my shoulder

    The Exodus is here
    The happy ones are near
    Let's get together
    Before we get much older

  23. #23
    New Member
    Join Date
    May 2002
    Posts
    14
    No one knows what it's like
    To be the bad man
    To be the sad man
    Behind blue eyes

    No one knows what it's like
    To be hated
    To be fated
    To telling only lies

    But my dreams
    They aren't as empty
    As my conscience seems to be

    I have hours, only lonely
    My love is vengeance
    That's never free

    No one knows what it's like
    To feel these feelings
    Like I do
    And I blame you

    No one bites back as hard
    On their anger
    None of my pain and woe
    Can show through

    But my dreams
    They aren't as empty
    As my conscience seems to be

    I have hours, only lonely
    My love is vengeance
    That's never free

    When my fist clenches, crack it open
    Before I use it and lose my cool
    When I smile, tell me some bad news
    Before I laugh and act like a fool

    If I swallow anything evil
    Put your finger down my throat
    If I shiver, please give me a blanket
    Keep me warm, let me wear your coat

    No one knows what it's like
    To be the bad man
    To be the sad man
    Behind blue eyes

  24. #24
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Originally posted by Booya05
    No one knows what it's like
    To be the bad man
    To be the sad man
    Behind blue eyes
    ...
    I love that 'Who's Next' was one of the early disks i bought years ago.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

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