Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / May 2008

Tip: Looking for answers? Try searching our database.

Best practices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Willian Lopes - 13 May 2008 02:35 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.