Change Access database using Ruby?

Is it possible to edit (create new records, add and modify content, etc.) an Access database with Ruby? If so, how?

If this is not possible, does anyone know of a good alternative for storing information from HTML forms?

+3


source to share


3 answers


If you intend to run this in a Windows box, then yes, it is possible to manipulate an Access database from Ruby via ODBC or OLEDB (ADO). However, the Database Engine is a poor choice for a web application database. In fact, "Microsoft strongly recommends using Access in web applications." (ref: here ).

If you plan to implement this on a non-Windows machine, then I would recommend that you just not bother with Access ODBC. You might be able to get JRuby and the UCanAccess JDBC driver to update the Access database, but that would not be a good choice for a web server either.



You really need to research other more suitable underlying databases for your web application: Microsoft SQL Server, MySQL, PostgreSQL, MariaDB, etc. etc.

+2


source


You can use all types of databases with Ruby - including Access database using the Ruby DBI module.



http://www.tutorialspoint.com/ruby/ruby_database_access.htm

+1


source


I have experience using database access with ASP and Ruby (some projects I have taken over). One piece of advice: don't do this, there are problems all the way. If you intend to keep it simple and small and want to have a portable / portable database without asking too much about speed and size, you can use SQLite. For all other uses, try the ones Gord suggests.

If you insist on having access to using sequel , it is an ORM that takes the burden of forwarding database data to objects and vice versa, and as a benefit, you can change the database you use later with just a few lines to change.

+1


source







All Articles