working with a Dataset

Results 1 to 2 of 2

Thread: working with a Dataset

  1. #1
    Join Date
    Dec 1969

    Default working with a Dataset

    I am having a hard time with using datasets. Does anyone have a good example or can help me out with updating back to the database.<BR><BR>I get the dataset. but making changes and updates are not working. Here is my dataset. How can I update the data in it and then confirm and send the changes back to the DB??<BR><BR> If Not Page.IsPostBack Then<BR> Dim OleDbConnection As System.Data.OleDb.OleDbConnection<BR> Dim myReader As System.Data.OleDb.OleDbDataReader<BR> Dim myCommand As System.Data.OleDb.OleDbCommand<BR> Dim sql As String<BR> <BR><BR> OleDbConnection = New System.Data.OleDb.OleDbConnection("provider=Micros oft.Jet.OLEDB.4.0; " & _<BR> "Data Source=c:databasesVacationVacAbsHost.mdb;")<BR> OleDbConnection.Open()<BR><BR> sql = "Select * from tblDayTypes;"<BR><BR> Dim da As New OleDb.OleDbDataAdapter(sql, OleDbConnection)<BR> Dim ds As New DataSet("dsTest")<BR> da.Fill(ds)<BR><BR> datagrid1.datasource = ds<BR> datagrid1.databind()<BR><BR> <BR> End If

  2. #2
    Join Date
    Dec 1969

    Default How about some links?

    I&#039;m too new to answer with my own coherent working code but these links at 4Guys helped me out. It&#039;s the whole series that Scott Mitchell did on DataGrid...since that is what I notice you are using in your code.<BR><BR><BR><BR><BR>Here is the index to the series:<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts