|
-
Dec 4th, 2002, 10:26 AM
#1
Thread Starter
Addicted Member
General ASP.NET Question. Need comments pls
Hello, I'm very new to asp.net, so bare with me.
I'm developing a small site with about 5 total webforms. I'm using ado.net to connect with SQL Server. What is the best way to have all webfoms use the same connection object? Any thoughts, ideas, or anything to add would be greatly appreciated.
Thanks'
-
Dec 4th, 2002, 11:10 AM
#2
you shouldnt do that. You dont want to keep a db connection open across pages. on each page open your db, you whatever actions you need to do with it, then close it immediatly
-
Dec 4th, 2002, 02:32 PM
#3
Thread Starter
Addicted Member
What if each page closed it after use and each new page request re-opened it. Also, what about the dataset reuse. Would you just pass it from page to page or store it somewhere globally??
-
Dec 4th, 2002, 03:13 PM
#4
Addicted Member
You could store the connection in a session object. You can also store datasets in a session as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|