Re: accessing the dataset tables, by name and not by index
- From: "William LaMartin" <lamartin@xxxxxxxxxxxxxxx>
- Date: Wed, 13 Jul 2005 22:45:00 -0400
I do that all the time. Here is some code using an XML data source. A
database source works the same, I believe.
Dim ds as new dataset
Dim DataPath As String = Application.StartupPath.Substring(0,
InStrRev(Application.StartupPath, "\"))
ds.ReadXmlSchema(DataPath & "MainResult.xsd")
ds.ReadXml(DataPath & "MainResult.xml")
dv = ds.Tables(0).DefaultView
msgbox(dv.Item(0).Item("Firstname")) will give you the entry for row 0 and
the column named Firstname.
"roni" <xservicex@xxxxxxxxxxx> wrote in message
news:db2mdq$r86$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> hi.
>
> i created a command that get 2 tables from db.
>
> when try to access the tables in the dataset , i can't access the tables
> by
> their names,only by index.
>
> is there a way to access them by name ? (meaning the dataset will
> automatic
> will set the real name of the db table ).
>
>
.
- References:
- Prev by Date: Re: Help - Why is double-click ignored??
- Next by Date: Structure ?
- Previous by thread: Re: accessing the dataset tables, by name and not by index
- Next by thread: Need help with form timer
- Index(es):