Results 1 to 5 of 5

Thread: how to bind datagridview to database at page load time in vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    13

    how to bind datagridview to database at page load time in vb6

    I use below code in try catch block but it gives exception"'table' argument cannot be null. Parameter name: table" .My table name is caste and that table two columns are there srno and castename .But it say that my table has no data.Memory table is a datatable.

    Dim Dset As New DataSet()
    Dset = New DataSet()
    Dset.Tables.Add(MemoryTable)
    DataGridView1.DataSource = Dset.Tables("caste")

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    13

    Re: how to bind datagridview to database at page load time in vb6

    i tried data bind with database using data source but it gives service pack 1 error

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    13

    Re: how to bind datagridview to database at page load time in vb6

    Name:  Untitled.jpg
Views: 154
Size:  26.8 KB

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: how to bind datagridview to database at page load time in vb6

    Thread moved from the 'VB6 and Earlier' forum to the 'VB.Net' (VB2002 and later) forum

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,352

    Re: how to bind datagridview to database at page load time in vb6

    Firstly, a moderator has moved this thread to the VB.NET forum because you are using VB.NET, not VB6. It doesn;t bode well that you don't even know what language you are using so it might not be a bad idea to do a bit of reading on the difference.

    As for the issue, do you now want to create a typed DataSet or do you want to stick to using an untyped DataSet as you were in your original code? If it's the former then I'd suggest that something in VS is broken so you should probably do a repair. If it's the latter then let us know and we can go back and address what's wrong with that code.

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