Please help with tutorial or sample

Discussion in 'ASP .Net' started by Lloyd Sheen, Mar 3, 2004.

  1. Lloyd Sheen

    Lloyd Sheen Guest

    In preparation for an app that will be a simple ASP.NET page with about 40
    text boxes I need sample to do the following:

    1. Select the current data (done)
    2. Bind to the textboxes (done)
    3. When user clicks the update button the page will update the data in the
    database.

    Existing code:

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    If Not Page.IsPostBack Then
    Me.SqlConnection1.Open()
    Me.SqlDataAdapter1.Fill(Me.TerrDataSet)
    Me.DataBind()
    Me.SqlConnection1.Close()
    End If
    End Sub

    The above works and shows the value of the fields in the text boxes.


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles Button1.Click
    Dim picnt As Integer
    Me.SqlConnection1.Open()
    Try
    picnt = Me.SqlDataAdapter1.Update(Me.TerrDataSet)

    Catch ex As Exception
    Dim s As String = ex.Message
    End Try
    Me.SqlConnection1.Close()
    End Sub

    This code shows a count of 0 for the Update???
     
    Lloyd Sheen, Mar 3, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lloyd Sheen
    Replies:
    0
    Views:
    452
    Lloyd Sheen
    Mar 3, 2004
  2. =?Utf-8?B?YXJp?=

    please help with msdn sample

    =?Utf-8?B?YXJp?=, Dec 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    422
    =?Utf-8?B?YXJp?=
    Dec 17, 2005
  3. Jake
    Replies:
    0
    Views:
    748
  4. Replies:
    4
    Views:
    838
    Chris Uppal
    May 5, 2005
  5. KK
    Replies:
    2
    Views:
    1,070
    Big Brian
    Oct 14, 2003
  6. MuZZy
    Replies:
    7
    Views:
    2,104
    Mike Hewson
    Jan 7, 2005
  7. Replies:
    1
    Views:
    579
    Valentino Volonghi aka Dialtone
    Jan 6, 2005
  8. Tim Chase
    Replies:
    0
    Views:
    236
    Tim Chase
    Feb 16, 2014
Loading...