Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5946355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:48:41+00:00 2026-05-22T16:48:41+00:00

When I migrate my application to Access 2007 with sequel library of Ruby. I

  • 0

When I migrate my application to Access 2007 with sequel library of Ruby. I get the errors as follows. Does anybody know how to migrate correctly? Thanks.

C:\ContractManagement>rackup
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/adapters/ado.rb:63:
in `method_missing': WIN32OLERuntimeError: (in OLE method `Execute': ) (Sequel::
DatabaseError)
   OLE error code:80040E14 in Microsoft Office Access Database Engine
     Syntax error (missing operator) in query expression 'LIMIT 1 1'.
   HRESULT error code:0x80020009
     Exception occurred.
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/adapte
rs/ado.rb:63:in `block (2 levels) in execute'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/databa
se/logging.rb:28:in `log_yield'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/adapte
rs/ado.rb:63:in `block in execute'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/connec
tion_pool/threaded.rb:84:in `hold'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/databa
se/connecting.rb:226:in `synchronize'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/adapte
rs/ado.rb:61:in `execute'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:541:in `execute'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/adapte
rs/ado.rb:97:in `fetch_rows'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:123:in `each'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:449:in `single_record'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:457:in `single_value'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:200:in `get'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/datase
t/actions.rb:133:in `empty?'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:499:in `schema_dataset'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:381:in `initialize'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:422:in `initialize'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:332:in `new'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:332:in `run'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/sequel-3.23.0/lib/sequel/extens
ions/migration.rb:316:in `apply'
       from C:/ContractManagement/config.ru:12:in `block in <main>'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:
51:in `instance_eval'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:
51:in `initialize'
       from C:/ContractManagement/config.ru:1:in `new'
       from C:/ContractManagement/config.ru:1:in `<main>'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:
40:in `eval'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:
40:in `parse_file'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:2
00:in `app'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:3
01:in `wrapped_app'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:2
52:in `start'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:1
37:in `start'
       from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.3.0/bin/rackup:4:in `<to
p (required)>'
       from C:/Ruby192/bin/rackup:19:in `load'
       from C:/Ruby192/bin/rackup:19:in `<main>'

Here is the connection configuration.
DB = Sequel.ado(:conn_string=>’Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ContractManagement1.accdb’)

And here is the migration steps. All are passed on PostgreSQL 8.4.

Sequel.migration do
  up do
    create_table :people do
      primary_key :id
      String :name, :size => 20, :unique => true, :null => false
      String :password, :size => 30, :null => false
      String :role, :size => 20, :null => false
    end
  end

  down do
    drop_table :people
  end
end

Sequel.migration do
  up do
    create_table :currencies do
      primary_key :id
      String :name, :size => 10, :null => false
    end
  end

  down do
    drop_table :currencies
  end
end

Sequel.migration do
  up do
    create_table :statuses do
      primary_key :id
      String :name, :size => 10, :null => false
    end
  end

  down do
    drop_table :statuses
  end
end

# encoding: utf-8

Sequel.migration do
  up do
    create_table :contracts do
      primary_key :id
      String :contract_id, :size => 36, :unique => true, :null => false
      String :content, :size => 150
      String :supplier, :size => 30
      Date :created_on
      Date :expired_on
      BigDecimal :amount, :size => [10, 2], :null => false
      Fixnum :debt_days
      Fixnum :guarantee_period
      String :order_id, :size => 50 # 订单号
      String :supplier_contract_id, :size => 36
      String :operator, :size => 30
      foreign_key :currency_id, :currencies, :on_delete => :cascade, :on_update => :cascade, :null => false
      foreign_key :status_id, :statuses, :on_delete => :cascade, :on_update => :cascade, :null => false
      constraint(:min_amount) { amount >= 0.01 }
    end
  end

  down do
    drop_table :contracts
  end
end

# encoding: utf-8

Sequel.migration do
  up do
    self[:currencies].insert(:name => "人民币")
    self[:currencies].insert(:name => "欧元")
    self[:currencies].insert(:name => "美元")
  end

  down do
    self[:currencies].delete
  end
end

# encoding: utf-8

Sequel.migration do
  up do
    self[:statuses].insert(:name => "执行中")
    self[:statuses].insert(:name => "关闭")
    self[:statuses].insert(:name => "作废")
  end

  down do
    self[:statuses].delete
  end
end

# encoding: utf-8

Sequel.migration do
  up do
    create_table :payments do
      primary_key :id
      BigDecimal :prepayment, :size => [10, 2], :default => 0 # 预付金额(元)
      BigDecimal :offset_prepayment, :size => [10, 2], :default => 0 # 冲预付
      BigDecimal :guarantee_price, :size => [10, 2], :default => 0 # 质保金
      BigDecimal :request_amount, :size => [10, 2], :default => 0 # 申请付款额
      foreign_key :contract_id, :contracts, :on_delete => :cascade, :on_update => :cascade
      foreign_key :person_id, :people, :on_delete => :cascade, :on_update => :cascade
      constraint(:offset_prepayment_is_not_greater_than_prepayment) { prepayment >= offset_prepayment } # offset_prepayment不能大于prepayment
    end
  end

  down do
    drop_table :payments
  end
end

Sequel.migration do
  up do
    {"admin" => "Admin", "contract" => "ContractOperator", "payment" => "PaymentOperator", "report" => "ReportReviewer"}.each do |n, r|
      self[:people].insert(:name => n, :password => n, :role => r)
    end
    self[:people].insert(:name => "payment1", :password => "payment1", :role => "PaymentOperator")
  end

  down do
    self[:people].delete
  end
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:48:42+00:00Added an answer on May 22, 2026 at 4:48 pm

    This is fixed in the master branch of Sequel, version 3.24.0 (which will be released next week) will have the bugfix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently attempting to migrate a legacy VBA/Microsoft Access application to Python and PyQt.
I have to migrate a web application I made with ASP.NET MVC to a
I am trying to migrate a Java application built by Ant to Maven2. Among
I am trying to migrate an .hta application to a C# executable. Of course,
We are about to migrate an intranet web application from using a proprietary forms-based
I have an application that we're trying to migrate to 64bit from 32bit. It's
I am planning to migrate a Delphi 6 BDE application to Delphi 2010... First
Any advice on how to migrate an existing Delphi 7 business application to .NET
I'm writing a .NET command-line application that will migrate users from an existing database
When changing the password-hashing algorithm for an application, how should the system migrate the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.