Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2006, 05:00 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default data is not updating into datasource

when i use fallowing code i am not getting any error but the data is updating in the databse.
  Dim table As DataTable
            Dim dr As DataRow
            table = ds.Tables("FEESDETAILS")
            dr = table.NewRow
            dr(0) = txtEnrollNO.Text
            dr(1) = txtName.Text
            dr(2) = txtDate.Text
            dr(3) = txtCourse.Text
            dr(4) = cmbGroup.SelectedItem
            dr(5) = txtAdmn.Text
            dr(6) = txtRegi.Text
            dr(7) = txtTfees.Text
            dr(8) = txtOthers.Text
            dr(9) = txtTotal.Text
            table.Rows.Add(dr)
            dgfeesdet.DataSource = table
            cb = New OleDbCommandBuilder(da)
            da.Update(ds, "FEESDETAILS"

 
Old May 23rd, 2006, 04:25 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

hi,

 do this after "cb = New OleDbCommandBuilder(da)"
da.insertcommand=cb.getinsertcommand()
da.updatecommand=cb.getupdatecommand
da.deletecommand=cb.getdeletecommand

call da.update after this


Anubhav Kumar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating data table vaidyapragati ASP.NET 2.0 Basics 4 May 11th, 2007 11:52 PM
Datasource doesn't support server-side data pagin saif44 ASP.NET 2.0 Professional 6 January 21st, 2007 08:17 AM
Updating Data Using DataAdapter ysebastian Classic ASP Databases 0 June 3rd, 2005 10:27 PM
Updating data with a cursor jscuderi SQL Server 2000 2 August 10th, 2003 08:14 AM
Data access and datasource name kev_79 Access 0 July 9th, 2003 12:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.