Results 1 to 5 of 5

Thread: dataset

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    162

    dataset

    how do i make a dataset so i can fill my adapter?

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: dataset

    Here's an example of one I created. It does seem a bit backwards, doesn't it?

    VB Code:
    1. Dim cmd As System.Data.SqlServerCe.SqlCeCommand
    2. Dim da As System.Data.SqlServerCe.SqlCeDataAdapter
    3. Dim ds As New System.Data.DataSet
    4.  
    5. cmd = dbM.GetCommand
    6.             cmd.CommandText = "SELECT * FROM EffortTable WHERE SessionDate >= '" & dt.ToShortDateString & "'"
    7.             da = New System.Data.SqlServerCe.SqlCeDataAdapter(cmd)
    8.  
    9.             da.Fill(ds)
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    162

    Re: dataset

    i think i did that before, but i could not see any results
    is my databinding correct?
    lblWeek.DataBindings.Add("text", ds, "week")
    where week a fieldname? i dont know about text.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    162

    Re: dataset

    still having binding problems. help.

  5. #5
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: dataset

    I'm afraid I know just about 0 about data binding. The code I have used to fill datasets is what I posted, and that's the only way I have used them (I tend not to use them at all if I can avoid them, but as you have found, sometimes they are the right tool).
    My usual boring signature: Nothing

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