473,378 Members | 1,400 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,378 software developers and data experts.

suggections for better database connectivity

Lal
Dear All,

I am seeking a valid suggestions from your side regarding the sql server
performance.
my connection object get initialized at the time of login. I remain
connected throu out the session that is I do not close the connection object
on whole programmed on run time. what are your suggestions should I open and
close the connections while interacting with the database or I should use
the same connection object thru-out the project which was initialize at the
login time.
I am using multiple databases and my program working with multiple locations
also.

kindly give a good suggestion.

Thanks and Regards
K R Lal

Nov 21 '05 #1
3 1058
Hi Lal,

I wouldn't leave the connection op the entire time, I would only open and
close it when you need it, and you're connection will be pooled so you don't
have to worry about opening and closing to much connections because .net
will get the connection from the pool. So I'd create a connection object at
login and then use that object during the entire program, but only open it
when I need it (don't forget to close it ofcourse)

greetz Peter

"Lal" <kr****@luxoroffice.com> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
Dear All,

I am seeking a valid suggestions from your side regarding the sql server
performance.
my connection object get initialized at the time of login. I remain
connected throu out the session that is I do not close the connection object on whole programmed on run time. what are your suggestions should I open and close the connections while interacting with the database or I should use
the same connection object thru-out the project which was initialize at the login time.
I am using multiple databases and my program working with multiple locations also.

kindly give a good suggestion.

Thanks and Regards
K R Lal

Nov 21 '05 #2
Lal,

Your question and the answer on that for SQL server is given often in this
newsgroups.

Create them as soon as you need the connection and dispose (2002/2003) them
as soon as you don't need it.

Most important reason the connection pooling.

Cor
Nov 21 '05 #3
Lal,

Before my message is misunderstood because of the answer from Peter.
My message means not keeping it open.

Cor
Nov 21 '05 #4

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

Similar topics

3
by: Alex | last post by:
I have developed a VB application that uses Oracle 8i database for backend. The database server is on the local network. From my development machine, the application connects (via ODBC) to the...
1
by: harish | last post by:
I am using java applications to connect to my MS SQL Server database. I am using ODBC for database connectivity. If i am running my java applications in a remote PC and try to connect to database...
3
by: junaid | last post by:
Hi to all, Can it is possible to connect to the databse like postgre or mysql through a C programm? I know the basics of C and I have developed a small program which uses a file for the...
3
by: Niks | last post by:
Hi, I need to connect to SQL server Database using a System DSN. Can anyone tell me how to connect to SQL Server using DSN in ASP.NET (VB.Net). Using a Try Catch block. Does anyone know how to...
8
by: David | last post by:
Hi, Could someone please xplain how to add a field to an existing SQL table in VB.Net I have added the field in the Server Explorer and it shows up when I reload the program but I cannot...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
47
by: Ivan Weiss | last post by:
Hi all, I am just getting started on a new app and am a rusty VB6 guy who is looking to create something on the side to serve as a corporate workbench for my company. ADO.net is new to me so...
0
by: dalaimanoj | last post by:
I have a form with buttons 'View', 'Save', 'Delete', 'Edit' and some textboxes to input data.. On clicking each buttons the database is connected and the respective action is done. For example...
0
by: okonita | last post by:
Hi all, I am having a DB2 connectivity problem that I hope someone can help me resolve. I need this to test Replication and such other things. What am I doing wrong here? Any help that I can get...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.