get raw sql query from ORM save cakephp 3.x - cakephp-3.0

I havea working cakephp 3.x app. Now I have to save information coming from web forms to 2 databases. One is the local app database, the other is a database on a remote server. When the internet connection to the remote server is not working, I need to save the query and attempt to run it later, when internet connection is back.
To achieve this I want to get the raw sql query from $this->model->save($entity) calls, save them in a special table in the local database. However, I can't seem to find a way to get the raw sql from cakephp ORM. How can it be done?

Related

How to sync MS SQL Server of Azure Portal with WordPress Database?

I want to establish 2 way sync between MS SQL Database with WordPress Mysql Database. I even tried to use Workbench or Microsoft SQL Server Migration Assistant for MySQL. But nothing worked. Every time i get some "Connection to MySQL Failed" Error.
I have even tried all option i have seen online but noting worked.
You have to tell us more about what you are trying to do.
As far as I can tell yo have 2 options:
Use PolyBase: Which is very impractical, close to retirement, lacking in documentation, and personally I wasn't able to install it not even once.
Use Linked Servers: As I posted in the reply you can follow the step by step guide and create a linked server to MySQL. From there you can query the linked server and eventually create a stored procedure that import/export data but forget about an on-time sync
Azure Data Factory: If you are on Azure SQL Database you can setup Azure Data Factory and create a pipeline for sync data. Or eventually use SSIS if you are on prem.

How to migrate large amount of data from MySQL database to SQL Server database with C# service

I have a MySQL database contains large amount of data.
I wanted to write a C# service program to migrate that data into SQL Server database.(Service should work fine with Insert as well as update with out performance issue).
Please help us if there is a way to accomplish this. If there is another way to achieve this is also fine. But, the MySQL client is not present in the local machine. But we could access the database from the server.
You can use the import and export functions in sqlserver, after installing a odbc mysql

connect express js to multiple db (mongo, mysql and neo4j)

A newbie question: I am trying to make an API server using express js. But dont know how to implement connecting to multiple dbs simultaneously like mongodb, mysql and neo4j.
Lets say a call to :
localhost/api/mongodb connects to mongodb
localhost/api/neo4j connects to neo4j
localhost/api/mysql connects to mysql
I am able to connect to each db separately like mongodb using mongoose and so on, but is it possible to make separate calls to each db and perform CRUD operations on them based upon POST/GET etc.

Titanium with a remote database

How is it possible to connect my Titanium project with a external / remote database.
Most tutorials and information I see are about local databases.
I just want to connect with an external online database so I could update a record.
Regards
You can get and set information in a mysql database if you write some php and hit up those urls, appending them with values to set, returning values to get.
See Gregor's post here; https://developer.appcelerator.com/question/51201/how-to-create-mysql-query-from-titanium-mobile

Why aren't changes in MySQL database being updated in WebMatrix Database viewer?

I have MySQL running on my local machine. I have created several tables in MySQL workbench and connected WebMatrix to the MySQL DB. All the tables are present, however one of them does not contain any data (but it contains data in MySQL database). I have refreshed in Web Matrix, redone the connection string etc but the data does not display. When I try to run the SQL that populated the database in MySQL, inside of WebMatrix I receive this error from the Database Manager:
Object reference not set to an instance of an object.
My SQL is too long to post here. Any suggestions?
Restarted MySQL service and refreshed in WebMatrix. Data is now present. Not sure what was causing the issues but is resolved.