pervasive sql database to ruby on rails - ruby-on-rails

Hey guys i am wondering how is it possible to either sync pervasive sql to another database or directly connect it to ruby on rails?
My accounting system uses pervasive sql and at the moment i am trying to use an ODBC connection from the database to my ruby application.
I am currently working with this website:
http://odbc-rails.rubyforge.org/
Has anyone made this happen before because so far i am getting really confused with how to do the connection and get data from the remote database.

I realize this is a bit late, but on windows based systems you can use OLE DB to connect to pervasive by doing something like this:
require 'win32ole'
conn = WIN32OLE.new('ADODB.Connection')
conn.Open = ('Provider=PervasiveOLEDB;Data Source=DEMODATA;')
recordset = ('Select * from some_table',conn)
data = recordset.GetRows.transpose
recordset.Close
There is no adapter for ole db and active record though. It might work by just setting the adapter to odbc, but i'm not positive.
If you can setup and odbc dsn you can also connect to pervasive the way described here.
If you can use JRuby, you have access to JDBC connections as described here.

Related

Connect a Rails application to microsoft access

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.

Move data from Sql Server 2008 to Mysql Rails

I've got legacy data in a SQL Server 2008 db. Since rails support for SQL Server is a little complicated, I'd like to move that data to MySQL. I've installed rails-sqlserver, so I can access the data from the old database.
Is there a way I can read the data from the SQL Server db but then save it to the MySQL db that is running the app?
Thanks
If you just need to move the data as a one off I'd export your data out of SQL Server as csv files providing your data isn't too complex.
I would manually create your MySQL tables so you can choose your data types as the options differ from those in SQL Server.
You could then import your csv files.

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.

How to connect to a MS Access database over LAN using Delphi?

I am writing an application that extracts data from a file and then saves the data in a MS Access database. I now want to write a client for this program where users can view the data with a nice GUI. How do I connect the client on another PC to the database on my PC using Delphi? For starters I would just like to display the MS Access Data in a DB Grid. I have never worked with networking before in Delphi.
There are lots of ways to do this. One simple way is just to set up an ODBC connection to the database (using ODBC administrator). It doesn't matter if this database is over the network - just map a drive or use a fully qualified name.
You then have a choice of components you can use to connect to the database. ADO is a good choice for Access. For starters try using a TADOQuery, TDataSource and data aware component such as a TDBGrid. There is plenty of documentation on how to uses these in the delphi help.

Why doesn't Microsoft support OLE DB connections to SQL Azure?

At the MSDN website it says, "Connecting to SQL Azure by using OLE DB is not supported."
There are other places on the web where folks report that it works fine for them after tweaking the server name in the connection string, such as here and here. Even SQL Server's Analysis Services uses OLE DB to connect to SQL Azure!
I develop a native/unmanaged application in Delphi that connects to SQL Server using ADO through the OLE DB provider for SQL Server. I'm considering adding SQL Azure support. It would be really helpful if I could reuse the majority of my code without not too much change. I probably wouldn't consider going this direction otherwise.
It would be helpful if Microsoft were more clear on why "OLE DB is not supported". If there are certain limitations within the use of OLE DB, what are they? Maybe I can work around them, or maybe it wouldn't affect me.
Microsoft also mentions that ODBC is supported. So could I use the "OLE DB provider to ODBC" and connect this way? Or is any combination that includes OLE DB "not supported"?
You can use it, however it has not been thoroughly tested for all cases. Essentially, it should work for most things, but there might be a few edge cases where it won't work. Until we document those cases, it remains unsupported. That being said, if you were to use and run into errors, we would love to know about it and prioritize that to be fixed.
Vote for the OleDB support for Azure here:
http://www.mygreatwindowsazureidea.com/forums/34685-sql-azure-feature-voting/suggestions/407269-ole-db-provider-for-connecting-to-sql-azure?ref=title
You can use ADO using the SQL Native Client although this information is hard to find you can read about it here http://msdn.microsoft.com/en-us/library/ms130978(SQL.110).aspx and here http://msdn.microsoft.com/en-us/library/ms131035(SQL.110).aspx.
In the connection string instead of using Provider=SQLOLEDB; we can use Provider=SQLNCLI10;. Also it is recommended to use DataTypeCompatibility=80;. So a SQL Native Client supported connection string would look like this:
"Provider=SQLNCLI10;Server=tcp:MyServerName.database.windows.net;Database=AdventureWorks2008R2;Uid=MyUserName#MyServerName;Pwd=MyPa$$w0rd;Encrypt=Yes;DataTypeCompatibility=80;"
You can also add "MARS Connection=True;" to the connection string for multiple recordsets.

Resources