473,396 Members | 1,895 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.

Database connection object in global area...

I want to create a code module that has a global variable that will
store a SqlConnection object. The idea is that all of my forms can
share this connection object. The connection would only be opened by
the form when needed and closed ASAP, but I wonder if there is any
downfall to doing this. The idea is to simplify the code and to reduce
the overhead in creating the connection object each time a connection
is needed. Does this make sence? Is the real overhead involved in
opening the connection or creating the connection object? Advice is
greatly apprecited!

Thanks

--- Andrew

Nov 17 '05 #1
0 900

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

Similar topics

11
by: pradeep_TP | last post by:
Hi all, I have a few questions that I have been wanting to ask for long. These are all related to ADO.net and specifically to conenction to database. 1) If I have opened a connection to a...
8
by: Nick N. | last post by:
Hi all, I just started to play around with VB.Net. I currenlty do Powerbuilder work and was wondering how database connection management works in VB.net. My applications typically pop-up a...
10
by: Nick N. | last post by:
Hi all, I just started to play around with VB.Net. I currenlty do Powerbuilder work and was wondering how database connection management works in VB.net. My applications typically pop-up a...
18
by: Wim | last post by:
Hi, I would like to make and put a query in my database by VB.NET code. Is this possible? Thanks for your help, wim
3
by: Ben | last post by:
Hi all I have made a vb.net windows app that works great in design. But after deploying the app on the same design computer (my own) the app can not find any of the two databases it needs to...
10
by: jt | last post by:
The program works like this: There is a form with a button. When the form is loaded, a separate thread is started which is retreiving/updating data in the database every x seconds. When clicked...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
7
by: Christian Blackburn | last post by:
Hi Gang, Let me start by saying I'm using Visual Web Developer 2005 and ASP.net 2.0. Is there something I have to do to get my Global.asax fire when my application loads. If I set a breakpoint...
6
by: John | last post by:
Hi I have a vb.net app that opens an access database runs several sql action queries on the tables and closes the db. This is done every few minutes. The problem is that sometimes I get an error...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.