469,889 Members | 1,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

Using SQLDataSource to fill a datatable or dataset

I am using Visual Web Developer 2005 Express Edition. I created a
SQLDataSource just by draging the control to the form and filling in
the blanks in the wizard.

In code I need to use the SQLDataSource to load data from several
tables into datasets or datatables, work with the data, then insert new
rows into tables in the SQL Server database.

I can not find any example code showing me how to do this. I don't
even see any example code showing me how fill a datatable using
SQLDataSource

In OLE I would just do

OleDbDataAdapter.fill(datatable)

How do I do that with a SQLDataSource?

Sep 6 '06 #1
1 11396
Dim dv As System.Data.DataView
dv = CType(mdsAllowanceDebit.Select(New DataSourceSelectArguments), DataView)

If dv.Count = 1 Then
txtAmount.Text = dv(0)("Amount")
txtDescription.Text = dv(0)("Description")
txtStamp.Text = dv(0)("Stamp")
Else
txtAmount.Text = "0.00"
txtDescription.Text = String.Empty
txtStamp.Text = Now.ToShortDateString
End If
On 6 Sep 2006 09:52:33 -0700, "tom c" <to******@gmail.comwrote:
>I am using Visual Web Developer 2005 Express Edition. I created a
SQLDataSource just by draging the control to the form and filling in
the blanks in the wizard.

In code I need to use the SQLDataSource to load data from several
tables into datasets or datatables, work with the data, then insert new
rows into tables in the SQL Server database.

I can not find any example code showing me how to do this. I don't
even see any example code showing me how fill a datatable using
SQLDataSource

In OLE I would just do

OleDbDataAdapter.fill(datatable)

How do I do that with a SQLDataSource?
Sep 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Datatable Dataset Datagrid help | last post: by
reply views Thread by Sam_Chou | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.