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 / New Users / July 2005

Tip: Looking for answers? Try searching our database.

connect to database using binding datagrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jassim Rahma - 08 Jul 2005 14:12 GMT
I am connecting t mysql & sqlserver database using bindng data cntrs
inculding the datagrid but I feel it's too slow.. specially when adding a
record to a database and needs to refresh the datagrid where I have to refill
the dataset which is a waste of time for the user specially on a network.

what is the best & fastest way to connect and refresh controls?
Cowboy (Gregory A. Beamer) - MVP - 08 Jul 2005 17:49 GMT
This really depends on whether you are talking ASP.NET or WIndows Forms. For
Windows forms, you can cache the DataSet on the client and set up your own
updater on a different thread. This will, in most instances, keep you in sync.

With ASP.NET, it gets trickier, as ASP.NET is completely disconnected and
also paints in HTML, so the direct connection to data is not there. You can
cache the DataSet on the server, which will speed things up somewhat, but you
will still have to round trip.

You can cut some of this out by using XML and only rebinding part of the
form, but this will make a less maintainable system.

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

> I am connecting t mysql & sqlserver database using bindng data cntrs
> inculding the datagrid but I feel it's too slow.. specially when adding a
> record to a database and needs to refresh the datagrid where I have to refill
> the dataset which is a waste of time for the user specially on a network.
>
> what is the best & fastest way to connect and refresh controls?
Ilya Tumanov [MS] - 08 Jul 2005 19:36 GMT
You mean you're adding records directly to the database by executing some
query and refilling DataSet to show it?

If so, that's not the right way to do it. Instead add record(s) to the
DataSet and run DataAdapter.Update() as soon as you ready to update the
database.

This way you can do a bulk update and new/changed records will be shown in
the grid instantly.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactfra
mework?hl=en

2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

>I am connecting t mysql & sqlserver database using bindng data cntrs
> inculding the datagrid but I feel it's too slow.. specially when adding a
[quoted text clipped - 3 lines]
>
> what is the best & fastest way to connect and refresh controls?

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.