Home All Groups Group Topic Archive Search About

Easy one, displaying field in a textbox

Author
6 Jun 2006 1:57 AM
Bonzol
vb.net 2003, 1.1. Windows Application. Access Database

Hey, I just want to display a field from a dataset(project1)

i've been trying

textbox1.text = project1.project.projdesccolumn.tostring

but all that does is display the column name

I know this is really simple, but I just cant find the correct syntax
to do it.

thanx in advance

Author
6 Jun 2006 3:01 AM
Mike McIntyre
Visit the link below for a good article.

http://www.devcity.net/Articles/115/1/my1st_accessdb1.aspx


Show quoteHide quote
"Bonzol" <Bon***@hotmail.com> wrote in message
news:1149559051.851935.124760@h76g2000cwa.googlegroups.com...
> vb.net 2003, 1.1. Windows Application. Access Database
>
> Hey, I just want to display a field from a dataset(project1)
>
> i've been trying
>
> textbox1.text = project1.project.projdesccolumn.tostring
>
> but all that does is display the column name
>
> I know this is really simple, but I just cant find the correct syntax
> to do it.
>
> thanx in advance
>
Author
6 Jun 2006 5:17 AM
Cor Ligthert [MVP]
Bonzol,

Be aware that you are using a strongly typed dataset. Tell that next time.
Most of us did not use that in version 2003.

textbox1.text = project1.project.projdesccolumn.tostring

What you tell is to use
TheDataset.TheDataTable.AProjectColumn.ToString

What you probably want to do is
TheDataset.TheDataTable.TheRow(ByTheIndex)(TheColumnName as String).ToString
The Columname as string can as well be
The Dataset.TheDataTable.TheColumnName, but that is a lot of typing.

I hope this helps

Cor


Show quoteHide quote
"Bonzol" <Bon***@hotmail.com> schreef in bericht
news:1149559051.851935.124760@h76g2000cwa.googlegroups.com...
> vb.net 2003, 1.1. Windows Application. Access Database
>
> Hey, I just want to display a field from a dataset(project1)
>
> i've been trying
>
> textbox1.text = project1.project.projdesccolumn.tostring
>
> but all that does is display the column name
>
> I know this is really simple, but I just cant find the correct syntax
> to do it.
>
> thanx in advance
>