473,396 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Caching my dataset

Hi,
I have a desktop app written in vb.net. It takes a wile to load from sql server via a stored proc. Is there a way I can cache the dataset so that If i reopen the the program it loads faster. The data in the database doesn't change that often. Where can I find info on this?

Thanks
Nov 20 '05 #1
2 2344
The first thing I'd determine is why is it taking so long and try to address
that issue. However that's obviously not your question. Anyway, you can
use dataSet.WriteXML to serialize it locally, just specify a local path.
Then when your app starts, check for the existence of the file and use
ReadXML if it does. All you need to do is pass in the path/file at a
minimum although specifying schema will speed things up dramatically. One
warning though, if you have a lot of data ie >1000 records, this is probably
not going to be the fastest thing in the world either depending on teh
schema of the dataset.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi,
I have a desktop app written in vb.net. It takes a wile to load from sql server via a stored proc. Is there a way I can cache the dataset so that If
i reopen the the program it loads faster. The data in the database doesn't
change that often. Where can I find info on this?
Thanks

Nov 20 '05 #2
Thanks for the response. The reason my sp is taking that long is that I am quering a progress database frpm sql server via openquery to get data. The result is less that 30 rows. What do mean by "specifying schema will speed things up dramatically"?

Thanks
"William Ryan eMVP" wrote:
The first thing I'd determine is why is it taking so long and try to address
that issue. However that's obviously not your question. Anyway, you can
use dataSet.WriteXML to serialize it locally, just specify a local path.
Then when your app starts, check for the existence of the file and use
ReadXML if it does. All you need to do is pass in the path/file at a
minimum although specifying schema will speed things up dramatically. One
warning though, if you have a lot of data ie >1000 records, this is probably
not going to be the fastest thing in the world either depending on teh
schema of the dataset.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
Hi,
I have a desktop app written in vb.net. It takes a wile to load from sql

server via a stored proc. Is there a way I can cache the dataset so that If
i reopen the the program it loads faster. The data in the database doesn't
change that often. Where can I find info on this?

Thanks


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: olle | last post by:
Hi folks. I learning asp.net and compare it with traditional asp and Access-developing. The issue is this one: 1/I have this Ms Acceess adp-project application that works fine on my Ms Sql...
1
by: moko | last post by:
I want to know whether 'dataset caching' is at the client end , or the server ? Similarly is an aspx page caching at the server or client ? Are there any 'gotchas' with caching ?
1
by: Gavin Pollock | last post by:
Is anyone using Caching (HttpRuntime.Cache) in Whidbey? Not sure if there's another newsgroup for this though since it's still beta.... I'm having issues running a system built on 1.1 in a 2.0...
10
by: BillGatesFan | last post by:
I'm trying to understand ASP.NET caching. I set the Page Output directive to VaryByParams= None and the duration = 60. Now whenever users hit my web app they can see each others data. Is there...
5
by: Craig G | last post by:
im having my first play about with caching a dataset but seem to be having some problems in doing so!! basically i have a dataset which i add to the cache as follows Cache.Insert("myDS",...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
1
by: Ben Fidge | last post by:
What are best practices for page output caching on pages that are dynamically generated from database tables. Our site has left-hand navigation that is comprised of dynamically generated menus...
1
by: RickG | last post by:
Can anybody clarify this please. Is there any problem in a web app of saving an object in a public variable as opposed to saving it in the cache? In my case, I have an object containing a hash...
17
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
4
by: Fred Nelson | last post by:
Hi: This is probably a newby question however I can't figure it out! I'm trying to use application data caching in a web application. I have read an article on 4 guys from rolla that shows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.