accessing the data from a wizard gen xsd dataset table
- From: Andre <Andre@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Apr 2007 15:14:03 -0700
How do a do this in the vb side of my aspx form to add a new row in my table
when I create a xsd dataset. I've searched with no luck. See the the do it
by code after the do it by wizard.
Wizard Code
Imports System.Data
Imports dsRSS
Imports dsRSS.tblRSSStoriesDataTable
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim ntbl As DataTable
Dim ndr As DataRow
*** ntbl = dsrss.tblRSSStoriesDataTable("tblrssstories)" ***
I get can not be used as an expression?
I created a web solution using hand coded data connections (WROX ASP NET1.0)
and I get the expeccted results
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim strconn As String
Dim strsql As String
Dim ds As New DataSet
Dim dbcon As OleDbConnection
Dim dba As OleDbDataAdapter
strconn = "Provider=Microsoft.JET.OLEDB.4.0; " & _
"Data Source=C:\Inetpub\wwwroot\ReadRSSFeeds\RSSFeeds.mdb"
strsql = "Select * " & _
"From tblRSSStories"
dbcon = New OleDbConnection(strconn)
dba = New OleDbDataAdapter(strsql, dbcon)
dba.Fill(ds, "rssStories")
dgview1.DataSource = ds.Tables("rssStories")
dgview1.DataBind()
Dim ntbl As DataTable
Dim ndr As DataRow
ntbl = ds.Tables("rssStories")
ndr = ntbl.NewRow() End Sub
End Class
.
- Follow-Ups:
- Re: accessing the data from a wizard gen xsd dataset table
- From: Douglas J. Steele
- Re: accessing the data from a wizard gen xsd dataset table
- Prev by Date: Re: How to copy selected list box values into another list box
- Next by Date: Re: Insert dataset to another database
- Previous by thread: Re: How to copy selected list box values into another list box
- Next by thread: Re: accessing the data from a wizard gen xsd dataset table
- Index(es):
Relevant Pages
|
Loading