A
Aaron Ackerman
I have reduced this thing down to the bare essentials and I still cannot add
a row. I have taken the suggestions and nothing.
I am pulling from the DB just find I just cannot add (so my connection is
good). I step thhrough this thing and I am definatly seeing a new row
getting added to the dataset so something must be wrong with the way I am
updateing the dataadapter...HELP!!! (THESE ARE ALL VISUAL CONTROLS)
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 IsPostBack Then
'Brand NEW request Fill the dataset and bind the data to the
grid
vdaPasswords.Fill(dsPasswords1)
Session("dsPasswords") = dsPasswords1
BindGrid()
End If
End Sub
' Bind the database to the table
Private Sub BindGrid()
dsPasswords1 = Session("dsPasswords")
DataGrid1.DataSource = dsPasswords1
DataGrid1.DataBind()
End Sub
' The "Add" button on this form is separate from the grid
Private Sub Add()
Dim dr As dsPasswords.PasswordsRow
dsPasswords1 = Session("dsPasswords")
dr = dsPasswords1.Tables("Passwords").NewRow()
dr("NUMBER") = 180
dr("USERNAME") = "SDASD"
dsPasswords1.Tables("Passwords").Rows.InsertAt(dr, 0)
DataGrid1.EditItemIndex = 0
dsPasswords1.AcceptChanges()
vdaPasswords.Update(dsPasswords1)
End Sub
a row. I have taken the suggestions and nothing.
I am pulling from the DB just find I just cannot add (so my connection is
good). I step thhrough this thing and I am definatly seeing a new row
getting added to the dataset so something must be wrong with the way I am
updateing the dataadapter...HELP!!! (THESE ARE ALL VISUAL CONTROLS)
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 IsPostBack Then
'Brand NEW request Fill the dataset and bind the data to the
grid
vdaPasswords.Fill(dsPasswords1)
Session("dsPasswords") = dsPasswords1
BindGrid()
End If
End Sub
' Bind the database to the table
Private Sub BindGrid()
dsPasswords1 = Session("dsPasswords")
DataGrid1.DataSource = dsPasswords1
DataGrid1.DataBind()
End Sub
' The "Add" button on this form is separate from the grid
Private Sub Add()
Dim dr As dsPasswords.PasswordsRow
dsPasswords1 = Session("dsPasswords")
dr = dsPasswords1.Tables("Passwords").NewRow()
dr("NUMBER") = 180
dr("USERNAME") = "SDASD"
dsPasswords1.Tables("Passwords").Rows.InsertAt(dr, 0)
DataGrid1.EditItemIndex = 0
dsPasswords1.AcceptChanges()
vdaPasswords.Update(dsPasswords1)
End Sub