PDA

Click to See Complete Forum and Search --> : dataset


citizenstitch
Aug 2nd, 2005, 07:52 AM
how do i make a dataset so i can fill my adapter?

Shaggy Hiker
Aug 2nd, 2005, 05:09 PM
Here's an example of one I created. It does seem a bit backwards, doesn't it?



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)

citizenstitch
Aug 3rd, 2005, 10:36 AM
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.

citizenstitch
Aug 3rd, 2005, 02:08 PM
still having binding problems. help.

Shaggy Hiker
Aug 3rd, 2005, 02:21 PM
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).