Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Database problems with the BETA, a little help?


Database problems with the BETA, a little help?

Author
Message
Mobius
Mobius
Forum God
Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)Forum God (105K reputation)

Group: Forum Members
Posts: 632, Visits: 1K
Hey all, in my never-ending quest to adjust to VS9, I've run into the following problem:

The below code is what I would use for a basic database update in a VB.NET Windows App. The TableAdapter has an update method, for which you use a Table that you create a new row for - "dbNewRow". Not too hard.

I'm now trying to apply the same concept to ASP.NET, but in VS9, I am unable to find the TableAdapter tool, and when I create a DataSet, its just not the same. I wouldn't think that it would be too much different, using the same version of VS, only with a web page, but I guess it might be.

Me.Table1TableAdapter1.Fill(Me.MessengerdbDataSet.Table1)
Dim dbNewRow As DataRow = Me.MessengerdbDataSet.Table1.NewRow()
dbNewRow("Column1") = TextBox1.Text
dbNewRow("Column2") = TextBox2.Text
dbNewRow("Column3") = TextBox3.Text
Me.MessengerdbDataSet.Table1.Rows.Add(dbNewRow)
Me.Table1TableAdapter1.Update(Me.MessengerdbDataSet.Table1)

Like I said, this is for a Windows App, so I guess, in a nutshell, shouldn't this work for ASP.NET? I tried following the same steps I would for a windows app, like I have done in the past with ASP.NET, but so far its a no-go.

Any thoughts would be magnificent.





-Mobius

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search