Hi everybody.
I´m starting with C# and .NET. So, I have some difficulties with some codes.
I´m already a programmer and I´m migrating from Delphi to C#. My questions
are:
1) Into a form I´ve made my connection string and my SqlConnection variable.
Now, I want use this connection to insert data from the form into table and,
of course, get some data from a table for a search. My doubt is that to much
people adviced me to don´t use DataSets ´cause they´re slow and get to much
system´s memory. So, how do I retrieve and insert this data without
DataSets? I read a lof ot tutorials but each of show a differente manner and
opinion.
2) Is there a manner to use dataBingding without DataSet?
Thanks for help!
Willian Lopes
Cor Ligthert[MVP] - 13 May 2008 05:52 GMT
Willian,
Is always nice to see messages like yours, they tell you that DataSets are
slow, however most the alternatives are less quick.
Therefore ask the one who said this to you about an alternative and ask him
a guarantee that it is quicker.
Some people use a dataset to make a copy of all the data in memory, then
they don't succeed and show their failures by saying things like you have
heard and go back to the old simulating punch card systems on disk they were
used to.
About the memory, be aware that OOP programming is not anymore using
principles of 1980, it is for sure spending more memory. Although the
assemblies (Exe/DLL) are extremely small compared to programs made by
languages from before the time of Net.
Cor
> Hi everybody.
> I´m starting with C# and .NET. So, I have some difficulties with some
[quoted text clipped - 14 lines]
>
> Willian Lopes
William Vaughn [MVP] - 13 May 2008 18:45 GMT
A Dataset is simply a collection of DataTable objects. The DataTable has
evolved to be fairly efficient and provides a whole series of properties,
methods and events that can reduce the code you have to write (fairly
dramatically). Yes, you can load up a custom array with rows from a query
but this means writing a lot more code that you have to support. Yes, you
bind to any class that supports IBindingList including arrays and
collections. Memory is never a consideration if you are judicious in how you
execute the query. No, a query should not be executed to return all the rows
of a database table. I discuss this in detail in my book.

Signature
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
> Hi everybody.
> I´m starting with C# and .NET. So, I have some difficulties with some
[quoted text clipped - 14 lines]
>
> Willian Lopes