how do i make a dataset so i can fill my adapter?
Printable View
how do i make a dataset so i can fill my adapter?
Here's an example of one I created. It does seem a bit backwards, doesn't it?
VB Code:
Dim cmd As System.Data.SqlServerCe.SqlCeCommand Dim da As System.Data.SqlServerCe.SqlCeDataAdapter Dim ds As New System.Data.DataSet cmd = dbM.GetCommand cmd.CommandText = "SELECT * FROM EffortTable WHERE SessionDate >= '" & dt.ToShortDateString & "'" da = New System.Data.SqlServerCe.SqlCeDataAdapter(cmd) da.Fill(ds)
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.
still having binding problems. help.
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).