Project

General

Profile

Backport #2947

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

=begin 
  
  Hi, 
 
  When opening a MS Access database with ruby code like 
 
  ---------------------------------------------- 
  require 'win32ole' 
  access = WIN32OLE.new('Access.Application') 
  database = File.expand_path('db2000.mdb') 
  access.OpenCurrentDatabase(database, false) 
  access.DoCmd.OpenReport("rptTest") 
  access.Visible = true 
  ---------------------------------------------- 
 
  ... database is opened read-write with MS Access 2000/2003, and ***read-only*** with MS Access 2007. 
 
  I have made tests under Window 7 with ruby 1.8.6 patchlevel 111 and patchlevel 398. 
 
  Database format is not an issue: the same problem happens with a database in 2000 (mdb) or 2007 (accdb) format. 
 
  I'm not sure if that's a ruby bug or a MS Access limitation, but vbs code like 
 
  ---------------------------------------------- 
  Set objAcc = WScript.CreateObject("Access.Application") 
  strDBName = "C:\Users\Philippe Lang\Desktop\db2000.mdb" 
  objAcc.OpenCurrentDatabase strDBName 
  objAcc.run "get_document_lines_store", "1234", "L", "1" 
  objAcc.DoCmd.OpenReport "rptTest", 2, "", "" 
  objAcc.Visible = true 
  ---------------------------------------------- 
 
  ... opens the database read-write, whatever version of MS Access we use. 
 
 =end 
 

Back