Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting my variable to ADO data element
Message
From
03/01/2007 01:22:41
 
 
To
03/01/2007 01:18:19
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01181662
Message ID:
01181675
Views:
7
Thanks.
I guess I'm way off.
I was trying to get oMyObject.GetString to work.

Hmmm....

Thanks again.


I'll
>>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?
>
>Assuming you have a dataview created, you can do something like this to get the row:
>
>
>loRow = loDataProvider.oDataView(0).Row
>
>
>and, then, from any field in that row such as:
>
>
>lcMyVariable = loRow("FirstName")
>
>
>If your dataset contains multiple rows, you can scroll to each row like this:
>
>
>        For lnCounter = 0 To loDataProvider.nCount - 1
>            loRow = loDataProvider.oDataSet.Tables("Temp").Rows(lnCounter)
>            lcMyVariable = loRow("FirstName")
>            ...
>        Next
>
>
>I am using a nCount provider of a data provider class. You may adjust to use the current count of your dataset.
>
>This is VB.NET code but can easily be adapted to C#.
The American Republic will endure, until politicians realize they can bribe the people with their own money.
- Alexis de Tocqueville

No man’s life, liberty, or property is safe while the legislature is in session.
– Mark Twain (1866)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform