How to avoid share problem with old Access

M

Mika M

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.
 
G

Guest

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.
 
C

Cor Ligthert

Mika,

I would ask this question in the newsgroup

Adonet
news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

Web interface:
http://communities2.microsoft.com/c.../?dg=microsoft.public.dotnet.framework.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top