473,654 Members | 2,968 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Leave connection open with local Access database

If you develop a stand alone c# windows application that only reads from a
single local Access database, do you need to close the connection each time
you navigate to a different record? No other person or program will ever
interact with this single table MS Access database.

I have been developing web applications where you open then close the
connection to an external datasource with each submission but this is so
different.
Apr 16 '06 #1
2 1971
On Sun, 16 Apr 2006 12:34:01 -0700, Gary <Ga**@discussio ns.microsoft.co m> wrote:
If you develop a stand alone c# windows application that only reads from a
single local Access database, do you need to close the connection each time
you navigate to a different record? No other person or program will ever
interact with this single table MS Access database.

I have been developing web applications where you open then close the
connection to an external datasource with each submission but this is so
different.


Can you please explain what you mean when you say, "navigate to a different
record"?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Apr 16 '06 #2

The reason to open/close the connection in distributed system is to save
server and network resources, when many users keep their connections open.
In you case it's not obligatory, you can keep connection open.
But why to read data from DB in navigation? why not to get data for the
currect select and keep them in DataSet?
If you develop a stand alone c# windows application that only reads from a
single local Access database, do you need to close the connection each time
you navigate to a different record? No other person or program will ever
interact with this single table MS Access database.

I have been developing web applications where you open then close the
connection to an external datasource with each submission but this is so
different.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Apr 17 '06 #3

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

Similar topics

6
8185
by: Rafi Kfir | last post by:
HI, I use vb6 to access database. I can select between "local" data base and "remote" data base. Both connection calls the same Access 2000 Mdb. The Mdb contains local tables (on the hard disk) and remote links to Oracle tables via odbc link. The local connection (to the recordset) is fast, but the "remote" connection takes around 7 minuits.
4
7227
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet user account (with same password as aspnet user on IIS (Devweb01)) 2) edited local machine.config file <ProcessModel> Password attribute to same password (both on IIS and SQL Machine) 3) SQL Server security is Sql Server and Windows
9
1330
by: AccessStarters | last post by:
Can anyone please help me simply connect to northwind? Maybe some logical steps that I may be missing? I have tried many tutorials and they all give similar connections to the one below. Dim objConnection As SqlConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _ "Initial Catalog=northwind") I still cannot get a connection with sqlserver2000 (set to authentication
4
3970
by: mescano | last post by:
I am currently implementing a singleton pattern for accessing a database. Is it advisable to close the connection to the database at all -- thus leaving it open or should it be closed. If closed, when should I it close it -- after the execution of the each command to the database? If leaving open, what impacts does it have. Imagining that it is one connection to the database. Thanks, mescano
6
1682
by: jonefer | last post by:
I have two versions of a 'Downtime Application that will run in the event that the mainframe goes down 1) SQL Server ASP.NET app (accessed outside the mainframe network) 2) MS Access Version of the same app locally installed (C Drive) Can someone help me with the 'Catch' part of this code in VB.NET? Pseudo code
10
5781
by: cleo | last post by:
I am migrating from VB6/Access to Visual Basic and SQL Express. I have success writing test code on my local machine and am now setting up tests for deployment to a server. I have installed SQL Express on a Windows 2003 Server. I can connect and create databases on the Remote Server from my local machine using SQL Management Express, so I know Remote Access is working. However, I am unable to connect using a connection string within...
16
2862
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with a worker thread that would execute the db commands. The pool was fixed and all the connections were created when the db access class was instantiated. The connections remained opened during the whole execution. If a connection was not available...
9
4756
by: fniles | last post by:
I am using VB.NET 2003 and SQL 2005. To use connection pooling and avoid the error "There is already an open DataReader associated with this Connection which must be closed first." , I understand that I want to release/close connections in a timely fashion. What I do is I declare the SqlClient.SqlConnection variable as a local variable inside my subroutine (instead of a global variable). Right before I Fill the dataset I open the...
6
8156
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a website...
0
8372
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8285
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8591
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.