-1

I'm currently working on an Multi-Device Hybrid App with Visual Studio cordova and I'm searching for a possibility to binding MS SQL Database to this project.

At the moment I have got only the idea to binding this via Windows Azure but I'm searching for another possibility.

It would be great if anyone could help me to find a solution.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
  • The question is too generic. You either build your own Server or use solutions provide by the cloud e.g Amazon EC2, Azure, Rackspace etc. – frank Nov 03 '14 at 16:01

1 Answers1

0

This is not possible - there is no MSSQL Server client library available for Cordova, and it is unlikely there will ever be one: SQL Server has its own binary network protocol over different transports and is also very chatty, making it inappropriate for mobile devices which typically have low-bandwidth, high-latency (and high packet-loss) connections.

The preferred approach for mobile applications is to have the application communicate with a webservice (aka "a cloud service") over HTTP in a low-chatter Request/Response pattern. This also enables the webservice to execute business logic rules prior to touching the database and making it easier to act upon locks and exclusive resources (think about how locking a table or row would work with 20 different mobile devices at once).

...this does not preclude you from attempting to write a SQL Server network client. You can't use JavaScript though, as WebSockets don't support connecting to traditional TCP sockets, you would have to develop a native Cordova plugin instead.

I did a quick search online and I cannot find any such plugins for Cordova/PhoneGap, so you're SOL for now. But as I said, a direct connection from a database wouldn't be a good design.

Dai
  • 141,631
  • 28
  • 261
  • 374