Datareader vs dataset over Wan link
Posted on 2013-12-06
I have trying to do some connections to a remote database and do a whole lot of reads. No no writing back to the db. So I am doing this in .net using a SQLreader. However occasionally it seems to cause a timeout with other connections to the database from a separate application.
So I always have to open the db execute the sql reader then close the connection.
what I am wondering is if I am using the dataset method even though I might get lower speed would it be gentler on the db and less likely to cause issues. The other apps like my app connect over a wan link as does my application.
The issue they get seem to be timeout related as well.
I am also thinking since the sql reader has to iterate through each result it might then a dataset that gets it all back in one hit.
So please advise thanks on my best options.