How to avoid share problem with old Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mika M

    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=Micro soft.Jet.OLEDB. 4.0;Data
    Source=\\server name\thepath... \database.mdb;U ser Id=admin;Passwo rd=;"

    Dim strSQL As String = "SELECT ..."

    Dim da As OleDbDataAdapte r = New OleDbDataAdapte r(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
  • Chris Podmore

    #2
    RE: How to avoid share problem with old Access

    Mika,

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

    Chris.


    "Mika M" wrote:
    [color=blue]
    > 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=Micro soft.Jet.OLEDB. 4.0;Data
    > Source=\\server name\thepath... \database.mdb;U ser Id=admin;Passwo rd=;"
    >
    > Dim strSQL As String = "SELECT ..."
    >
    > Dim da As OleDbDataAdapte r = New OleDbDataAdapte r(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
    >[/color]

    Comment

    • Cor Ligthert

      #3
      Re: How to avoid share problem with old Access

      Mika,

      I would ask this question in the newsgroup

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

      Web interface:


      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


      I hope this helps anyhow?

      Cor


      Comment

      Working...