Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No simple way to do data in .NET!
Message
 
 
To
29/03/2010 16:37:23
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01457894
Message ID:
01457948
Views:
86
>>You know, I guess I was spoiled with Visual FoxPro; it seems that Microsoft (and earlier with Fox Software) took such a simple approach to handling data that I cannot now understand how it is that this can be made so complex in .NET.
>>
>>Yes, I am complaining.
>>
>>I am pouring through C# books, and all kinds of other books, and I am telling you, there is no simple way to do data in .NET. Of course, admittedly, I am speaking from inexperience with .NET. I am still trying to learn C#, much less how to handle data. Still, data handling, in my opinion, is a much more complex matter in .NET. Why does it have to be this way? It seems that there is a multitude of ways to handle data, using LINQ, ADO.NET, and so on. I just don't know where to begin. I just ordered Murach's ADO.NET 3.5 with C# book to see if this might help me a bit.
>>
>>Also, a few years ago when I got into C# in some local colleges, C# also seemed cryptic to me, but it now seems much easier. I guess it is a matter of time and experience. I don't think it is this way entirely with .NET data handling. There seem to be many more steps to handling data, unlike VFP and other xBased languages.
>>
>>Okay, I am finished with my complaining for now. :)
>>
>>Does anyone want to help me complain, or perhaps direct me to a simple tutorial on .NET data-handling?
>>
>>Has anyone else on UT here felt just as frustrated as I am feeling, or did y'all get over it 3 or 4 years ago while I was still making money with VFP?
>
>Yes, I got some frustration at first when starting to learn it. But, this is the same pattern for everything new. But, as is the case for everything I do, I always built classes to handle that. So, since a few years, for all applications I have done, it comes down to be as simple as this:
>
>
>        Dim loDataProvider As Framework.Framework.Data = New Framework.Framework.Data(oProcess)
>        Dim loRow As DataRow
>
>        ' Do a SQL exec to retrieve one record
>        loDataProvider.ParameterAdd("Numero", lnPrimaryKey)
>        If Not loDataProvider.SQLExec("SELECT List.SomeField FROM List " + _
>         "WHERE List.Numero=" + loDataProvider.ParameterAddSQL("Numero")) Then
>            Return False
>        End If
>
>        ' Get it into a row
>        loRow = loDataProvider.oDataView(0).Row
>
>        ' Get the value
>        lcValue = loRow("SomeField")
>
>
>So, basically, you would only have to do it once, by building your own class for data handling such as the data provider class I have built. Or, you can go with commercial frameworks available which also uses the same approach.

What your ParameterAddSQL method does?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform