>Hello.
>
>I've been trying to set a variable to a data brought back from a foxpro table.
>
>In VFP it would look something like this:
>
>lcMyVariable = ALLTRIM(customer.firstname)
>
>
>What would be C# version of this statement?
What type of object is your data in? Is it in a datatable or dataset, or other object?
For the dt or ds
ds:
string myCust = ds.Tables["Mytable"].Rows[0]["firstname"].ToString()
dt:
string myCust = dt.Rows[0]["firstname"].ToString()
I have only one row in my data row 0. You may need to filter through a data table to find the row your looking for, and substitute the 0 with the var for that int value.
int rNumber = 9
string myCust = dt.Rows[rNumber]["firstname"].ToString()
Clear as mud right?