Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Using VB.Net 2008 with Access 2007 database on Windows Server 2008

Using VB.Net 2008 with Access 2007 database on Windows Server 2008

Scheduled Pinned Locked Moved Visual Basic
questioncsharpdatabasesysadmin
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abiemann
    wrote on last edited by
    #1

    This code, to open and read a local access 2007 database, works perfectly fine on my (Vista) development station: 'open the Access 2007 database without a password Dim DBconnection As OleDbConnection Dim DBcommand As OleDbCommand Dim DBdataReader As OleDbDataReader = Nothing Dim strProgramPath As String = System.AppDomain.CurrentDomain.BaseDirectory() Dim strDBfullPath As String = strProgramPath + "labs.accdb" DBconnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + strDBfullPath + ";Persist Security Info=False;") DBconnection.Open() However, once I copy my program to the Windows Server 2008 machine as well as the same database I used for development: 1) the code above takes a long time to execute 2) .Open fails Why does it work fine on Vista, but fails on Server 2008 eventough the database on both machines are the same ?

    A 1 Reply Last reply
    0
    • A abiemann

      This code, to open and read a local access 2007 database, works perfectly fine on my (Vista) development station: 'open the Access 2007 database without a password Dim DBconnection As OleDbConnection Dim DBcommand As OleDbCommand Dim DBdataReader As OleDbDataReader = Nothing Dim strProgramPath As String = System.AppDomain.CurrentDomain.BaseDirectory() Dim strDBfullPath As String = strProgramPath + "labs.accdb" DBconnection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + strDBfullPath + ";Persist Security Info=False;") DBconnection.Open() However, once I copy my program to the Windows Server 2008 machine as well as the same database I used for development: 1) the code above takes a long time to execute 2) .Open fails Why does it work fine on Vista, but fails on Server 2008 eventough the database on both machines are the same ?

      A Offline
      A Offline
      abiemann
      wrote on last edited by
      #2

      so the problem here seemed to exist because the compilation was set to "any CPU". Once I set the compilation option to x86, the application was able to open the database on the Server 2008 machine too (64bit machine). So it seems there's no 64bit driver to access an Access 2007 DB ? I'm glad it's at least working now, however, on my (32bit) Vista development station the data access is very fast and on the (64bit) Server 2008 station data access is very slow; instant vs. 30 secs

      I D 2 Replies Last reply
      0
      • A abiemann

        so the problem here seemed to exist because the compilation was set to "any CPU". Once I set the compilation option to x86, the application was able to open the database on the Server 2008 machine too (64bit machine). So it seems there's no 64bit driver to access an Access 2007 DB ? I'm glad it's at least working now, however, on my (32bit) Vista development station the data access is very fast and on the (64bit) Server 2008 station data access is very slow; instant vs. 30 secs

        I Offline
        I Offline
        i i i
        wrote on last edited by
        #3

        :-D

        Best Of Regards, SOFTDEV Sad like books with torn pages, sad like unfinished stories ...

        1 Reply Last reply
        0
        • A abiemann

          so the problem here seemed to exist because the compilation was set to "any CPU". Once I set the compilation option to x86, the application was able to open the database on the Server 2008 machine too (64bit machine). So it seems there's no 64bit driver to access an Access 2007 DB ? I'm glad it's at least working now, however, on my (32bit) Vista development station the data access is very fast and on the (64bit) Server 2008 station data access is very slow; instant vs. 30 secs

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          abiemann wrote:

          So it seems there's no 64bit driver to access an Access 2007 DB ?

          True, at this time there is no 64-bit drivers for a Jet database (Access). Since you cannot mix 64 and 32 bit code in the same process, you have no choice but to compile your app forced down to 32-bit only. If you used any of the SQL Servers, including SQL Server Express Edition, you wouldn't have this problem.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups