473,401 Members | 2,127 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,401 software developers and data experts.

How to avoid share problem with old Access

My contact has really old Access 2.0 database still in their production
use, and application which uses that is propably made by VB5 or VB6.

Now I should to do few SQL-queries and make charts according those
queries of this Access database with VB.NET. I tried to do it like this
way...

Dim strConnStr As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\servername\thepath...\database.mdb;User Id=admin;Password=;"

Dim strSQL As String = "SELECT ..."

Dim da As OleDbDataAdapter = New OleDbDataAdapter(strSQL, strConnStr)
Dim dt As DataTable = New DataTable
da.Fill(dt)
da.Dispose()
da = Nothing

grid.DataSource = dt

....it's working, but causes share/locking problems error messages for
other users who are using that other application - so how to get SQL
SELECT-query without this kind of problem?

The one who has made that Access 2.0/VB5 or VB6-application no more
supports it, so they asked me to make other tiny application for their
new report needs.

--
Thanks in advance!

Mika
Nov 21 '05 #1
2 985
Mika,

I don't know if it will make a difference or not but have you tried the
OleDbDataReader instead of the OleDbDataAdapter? As the DataReader is
read-only it may solve the problem.

Chris.
"Mika M" wrote:
My contact has really old Access 2.0 database still in their production
use, and application which uses that is propably made by VB5 or VB6.

Now I should to do few SQL-queries and make charts according those
queries of this Access database with VB.NET. I tried to do it like this
way...

Dim strConnStr As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\servername\thepath...\database.mdb;User Id=admin;Password=;"

Dim strSQL As String = "SELECT ..."

Dim da As OleDbDataAdapter = New OleDbDataAdapter(strSQL, strConnStr)
Dim dt As DataTable = New DataTable
da.Fill(dt)
da.Dispose()
da = Nothing

grid.DataSource = dt

....it's working, but causes share/locking problems error messages for
other users who are using that other application - so how to get SQL
SELECT-query without this kind of problem?

The one who has made that Access 2.0/VB5 or VB6-application no more
supports it, so they asked me to make other tiny application for their
new report needs.

--
Thanks in advance!

Mika

Nov 21 '05 #2
Mika,

I would ask this question in the newsgroup

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

When you get not a good answer in a week, than maybe you are lucky

There is a chat about VBNet and AdoNet normally is at least David Sceppa in
that
http://msdn.microsoft.com/chats/chatroom.aspx.

See for your local time
http://msdn.microsoft.com/chats/

I hope this helps anyhow?

Cor
Nov 21 '05 #3

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

Similar topics

6
by: | last post by:
I have a class with overloading operator new. (Because, if an identical object exists, return a pointer to existed object instead of a new pointer) It has no sense (it is dangerous) to allocate an...
4
by: Jay Mack | last post by:
Hello, I converted an Access application that used to have a MDE front-end (distributed to each user) with a MDB back-end on a share. It now has a MDE front-end with linked ODBC SQL Server 2000...
1
by: brian.oneil2 | last post by:
Is there a way to install this onto a network file share and allow a team to access it? I would say share a CD from a networked CD drive, but there are multiple CD's that would have to be inserted....
4
by: Scott Nicholson | last post by:
I've got a site set up that uses a network share as it's home directory. Simple stuff is working fine. When I try to put a database in there, though, I run into problems. I'm using: dim...
2
by: yxq | last post by:
Hello I want to create and delete the folder share, i found that it is ok for generic folder, but it does not work for Root directory(i.e c:\, d:\) The code...
0
by: John Fleming | last post by:
Hello, I am building a web application with the following components: 2 Web Servers - Windows Server 2003 - IIS 6 - .Net Framework version 2.0 - Reside in Domain A 2 Clustered Database...
3
by: Michel Smit | last post by:
Hello, I have a question. We have a webserver in a domain, DomainA, and a webserver in a DMZ with local users and groups only. I'm trying to copy a file from the DomainA webserver to the DMZ...
12
by: Sune | last post by:
Hi all, I want to make data stored in-memory (not disk) available to several processes. My concern is that poorly written C applications with dangling pointers may(will) damage the data in this...
3
by: =?Utf-8?B?Q2hyaXN0aWFuIGZyb20gRnJhbmNl?= | last post by:
I want to write an aspnet aspx page This page : 1 - Connect to a net share \\server\c$ with credentials: user/password 2 - Read Directory info of this share 3 - Write these infos in the...
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...
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
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,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.