Connect a Rails application to microsoft access - ruby-on-rails

I have a client which want to have data from a form to an access database. I seen some odbc connector for rails but it's only old projects.
I can export/inport data in CSV but I want the simpler solution.
Do you know if there is a solution to connect Rails with Access?
Thanks!

If his access database doesnt already exist then a good solution would be to create a rails application with a MySQL database then use microsoft access as a front end to the mysql db (OBDC). Ref Access as front end to MySQL
So he can see all data from the mysql db through access and easily import the entire db to his local machine if he wanted to but it wouldn't be required.

Related

Can Node and Rails share database?

I have a Rails app which is using Postgresql. I want to make a new Node + React Native app and I want to use the same database (usernames, passwords and other details will be shared).
I saw lots of sources which are explaining how to set up Postgresql on Node, but how do I set up an existing database? For the dev environment it is stored locally if I'm not mistaken.
You just need to use this package.
https://github.com/sequelize/sequelize
This is a connector for nodejs and postgresql.
But I suggest you do not use both of them handle database migration at the same time.
You can use rails to handle the migration. And just implement the database query in nodejs.

Store UmbracoIdentity data in SQL Server

I have implemented Umbraco using UmbracoIdentity for membership and everything was going fine until I deployed my solution to an Azure Web App. On azure I am getting permission errors because UmbracoIdentity is using a SQL Server CE database stored in the App_Data folder.
For reference the error I am getting is:
Exception type: SqlCeException
There is a file sharing violation. A different process might be using the file. [ ...\wwwroot\App_Data\UmbracoIdentity.sdf ]
My Umbraco data is being stored in an SQL database and I would like to store my UmbracoIdentity membership data here as well. I would appreciate any help in how to setup SQL Server as the user store for membership data.
You need to implement the IExternalLoginStore.cs interface and then configure the application to use it. It should be fairly simple to implement as you can use the SQL Server CE implementation as an example. I've done one for Azure Table Storage - you can check the Readme at https://github.com/alindgren/UmbracoIdentity.AzureLoginStore to get an idea of how to configure the app to use a custom external login store (which for me was the least obvious part).

How to setup new Redshift database with Heroku/Rails 4 app

I have been using Heroku-postgres as my database for my rails 4 app deployed to Heroku.
I connect to the DB locally using pgAdmin3, and haven't had any issues.
Now, I want to switch my database to a amazon-redshift instance which has been spun up for me. All I have is a username, password, and the database host name. Where do I store this information within my Rails 4 app so that my app will use this DB instead of the current postgres DB?
I provided a similar answer here, but I would recommend using this adapter to connect:
https://github.com/fiksu/activerecord-redshift-adapter
This certainly works well for any ActiveRecord query you need to do, I'm using insert statements to update redshift tables rather than ActiveRecord create. Working on a full redshift adapter, hopefully to be released in the next few weeks.
Here's the answer I've given in the past with code examples about halfway down:
How can I build a front end for querying a Redshift database (hopefully with Rails)
Heroku will need to support Redshift as a database option for you, otherwise you'll need to spin up your own stack.
It might be worthwhile checking out AWS EBS service to do this.

Access Outside Database from within Rails

I need to access data in an MS SQL database from a rails app.
The MS SQL database is maintained by our contractors, we just need to access data from it.
Is there a way in rails that I can access an outside db (not the main rails db)?
I can write my own SQL queries, I just need to open a connection to that outside db.
I'm on Rails 3.2.1
Thanks
Check out Connection Ninja , it's pretty straight forward and easy to use.

iOS Web Database

I need to populate a table in an iOS application with data from a Web database
I already have a MySQL database set up but reading about this it seems there must be an easier way for the iOS to interact with a web database
Any help or pointers would be appreciated,
Thanks
You should make an API interface.
Then use the API to communicate with the database. Using the database directly is a very bad thing to do.
If you are really desperate, consider using the MySQL C library. This article explains it in great detail:
http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/
For my application, I chose to create a web service to act as an intermediary between my application and the database.
This layout has several advantages. Considering you have MySQL database you can try to create some php scripts (I chose php because the API to work with mysql is very very simple and as you said, you don't need very high security or performance).
You can use these scripts through HTTP requests (you can use NSURLConnection to do these).. These scripts connect to mysql , fetch the data you need to pass the result back to the application in an easier to use format (e.g. I use JSON).

Resources