473,479 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Please help with tutorial or sample

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???
Nov 18 '05 #1
0 813

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11546
by: Al Bogner | last post by:
Since weeks I am searching the net from time to time how to build a small MYSQL-Frontend for a simple small database. The last decision ist not made, but it looks like, that I will learn Python. ...
2
1858
by: Al Dykes | last post by:
I'm looking for info on programming with glade on python, and maybe some sample code to hack. I've got python installed, but need a howto for glade and google doesn't help me. Any suggestions ?
2
1205
by: sinner8347 | last post by:
hi, im new to asp programming.hope anyone can provide a online tutorial link or what ever material to allow me to do some asp programming on my own.thx a lot -- sinner8347...
6
3130
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
0
981
by: Craig Bumpstead | last post by:
Hi, Does anyone know of a tutorial or sample code for using the chart control? Thank you, Craig
5
1376
by: tanuki | last post by:
Hi all, would anyone care to share a simple directdraw/direct32 sample/tutorial using vb.net ? thanks tanuiki
1
1663
by: D. Shane Fowlkes | last post by:
Hey guys....I tried Googling and search these forums before posting but couldn't find really what I was looking for. I'm looking for a very simple example or tutorial on how to nest Repeaters in...
1
9578
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
231
by: TonyJ | last post by:
Hello! I use VS2005 and C#. I'm looking at ADO.NET and have found some test tutorial on microsoft MSDN. It can be found on google when searching for "Walkthrough: Saving Data to a Database...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7067
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4463
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2980
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2970
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1288
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.