Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 6th, 2005, 11:04 PM
Registered User
 
Join Date: Jun 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default OleDbDataAdapter


Hi,
I'm new to db programming and need some advice...

I have a windows application that I want to be running on several networked computers and accessing the same db (ms access file). I'm worried that there may be times when two user will access the db file at the same time and give an connection open error. I've played around a little bit and have noticed that using the DataAdapter to Fill and Update does not give any connection open errors (even if the connection is open by mistake or if another Fill is happening).

So what's the best plan...
If I have a situation of multiple users of a db, should I try and use the DataAdapter as much as possible to avoid db open errors?

Thanks for any advice you can give,
Ron



 
Old June 7th, 2005, 05:49 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you haven't had any problems yet with the method you are using I'd suggest you stick with that.

The data adapter method is probably safer because it will provide disconnected data such that you'll execute bulk data retrieval then disconnect. This should minimize problems.

-Peter
 
Old June 9th, 2005, 04:16 PM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Database connection will be open only when you need to use DataAdapter to fill or to run DataCommand.
Besides those, the database is operated in DataSet which is just a temp database and later will be updated with the Server Database






Similar Threads
Thread Thread Starter Forum Replies Last Post
OleDbDataAdapter Problem RAnderson14 Pro VB Databases 0 April 11th, 2008 10:29 AM
OleDbDataAdapter Help mirage456 General .NET 1 July 5th, 2007 02:11 PM
database paging using asp table+ oledbdataadapter yamensaleh ASP.NET 2.0 Basics 0 January 27th, 2007 10:09 AM
DataSet and OleDbDataAdapter ? justin_min ADO.NET 2 November 22nd, 2004 10:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.