By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 954 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

How to avoid share problem with old Access

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.