We are migrating from an ASP.NET/SQL server setup to a rails/mysql setup. Because of this, I need to transfer the data out of my SQL Server database, but I can't directly move it from SQL Server to mysql because there are some things which need to be done on a per-record basis by rails in a filter.
Due to the way this process needs to be handled, I think the best way would be for my rails web server to consume a web service from the ASP.NET server and have it pull the records from the SQL Server database. After the rails server modifies the data, it can then save each record in the database.
I want to return a simple "select * from table_name" query which is determined by the rails server. In short, I want the rails server to send "select * from customers" to the ASP.NET server, then the asp.net server return the list of data via XML or json.
Is this possible? I know it's possible to return data via a web service, but I am wondering if if the sql query can be determined on the consuming server.
Thank you!
You should check the WCF Data Services and ADO.NET Data Services
I think it fits your needs.
For table Customers
query to your DataService will be http://localhost:12345/DATABASE_NAME.svc/Customers
, and you can easily add some filter expressions to your query.