Results 1 to 4 of 4

Thread: Close ended Database connection in CSharp.

  1. #1
    Join Date
    Jan 2011
    Posts
    9

    Close ended Database connection in CSharp.

    I am working as a software developer in a small IT company. Up till now in all my projects I used only normal database connection we normally used in vb6.0. But in current working projects client told me that while coding be careful about one thing that is not to give too much pressure on server if they found that my application is putting lot of pressure on their server interacting with data stored in database than they will refuse my project. I only know the normal method of connectivity. Please reply as soon as possible I want to complete my project as soon as possible.

  2. #2
    Join Date
    May 2009
    Posts
    511

    Re: Close ended Database connection in CSharp.

    It is not an issue for which you stopped your process of development. There are two types of connection techniques available in c#. One is open ended connection and second is close ended connection. Open ended connection is one which is you used. In open ended connection you remain in contact of server as long as you are interacting with database. But in close ended connection you take a copy of database on your local machine and close the connection. For taking a copy of database you just need to create one object of dataset in that with the help of data adapter object.eg:- da.fill (dataset object, table name). You can then update the changes you made on your copy to database using data adapterers Update method.

  3. #3
    Join Date
    Apr 2009
    Posts
    569

    Re: Close ended Database connection in CSharp.

    Yes! There is an alternative to open ended connection technique that you are using which puts tremendous pressure on your server where you’re all data is placed. Close ended tech. put’s less pressure on server side. Just one thing on which you have to concentrate is not use close ended connections technique when there is a requirement of reflecting the changes in database as soon as you perform some action in your application so be clear when to use what.

  4. #4
    Join Date
    May 2009
    Posts
    543

    Re: Close ended Database connection in CSharp.

    Close ended connection will definitely solve your problem regarding connection. There is a same method to use in all type of connections that you establish with server. It may be sqlserver or any other. Method is unique for all types of connections. Just one difference is there that is after taking copy of database on dataset don’t try to put it another database into it use different dataset object for dealing with new database.

Similar Threads

  1. How to make Database connection in ASP.NET
    By Neil'o in forum Software Development
    Replies: 4
    Last Post: 16-11-2011, 11:06 AM
  2. Connection failed for the database login
    By Indivar in forum Software Development
    Replies: 5
    Last Post: 18-11-2010, 12:03 AM
  3. How to make the Database connection in PHP
    By AK_Chopra in forum Software Development
    Replies: 3
    Last Post: 05-09-2009, 09:35 AM
  4. How to make odbc connection force to close
    By Rixwel in forum Software Development
    Replies: 3
    Last Post: 13-08-2009, 09:39 AM
  5. How to create Database connection?
    By Majestic in forum Software Development
    Replies: 2
    Last Post: 18-11-2008, 03:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,859,704.87042 seconds with 17 queries