Roland,
Are you using a regular DataSet or a Typed DataSet?
I don't do VB, but I'm pretty sure the syntax is the same for VB as it is for C#.
Regular DataSet :
sAddress = (string)ds1.Tables["Customer"].Rows[0]["Name"]
-or-
sAddress = ds1.Tables["Customer"].Rows[0]["Name"].ToString()
Typed DataSet :
sAddress = ds1.Customer[0].Name
HTH,
~~Bonnie
>Hi,
>
>Using VB.net
>WinForm
>SqlAdapter
>
>How do you reference a DataSet Field Name directly in code to fill a variable?
>
>The following lines do not work.
>
>Public sAddress AS String
>
>sAddress = Ds1.Customer.Name
>sAddress = Customer.Name
>sAddress = Name
>
>What is the proper code?
>
>Thanks
>roland