#1 2014-11-22 01:16:02

restneophyte
Member
Registered: 2014-11-18
Posts: 26

How to access a mySQL database as a Client?

On a Windows 8 64-bit machine, using Delphi XE7 Update 1, I adapted the '28 - Simple RESTful ORM Server' example, so that the server 'links' to a mySQL database stored in the cloud. Everything works as expected.

My question is 'how to I implement the client side?' As suggested in '16.2. Generating client wrappers,' I tried to generate the source code needed for client access. But, so far, all my attempts have failed. Am I going at it the wrong way?

Offline

#2 2014-11-22 10:42:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: How to access a mySQL database as a Client?

What did you try exactly?
Honnestly, "Publishing the code generator" paragraph is pretty easy to follow.

I've added the wrapper generation method to '28 - Simple RESTful ORM Server' example.
See http://synopse.info/fossil/info/b0fd38d077

I think the main difficulty is to put the right folder where the mustache templates would be found.
But I'm confident you would be able to do this!

Offline

#3 2014-11-24 19:19:46

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: How to access a mySQL database as a Client?

Thank you for your help.

You were right. My program was not pointing to the right folder (in terms of the location of the mustache templates). Once I understood the nature of my problem, the fix was easy.

Offline

#4 2014-11-24 21:37:47

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: How to access a mySQL database as a Client?

Great!

Any feedback from "cloud hosting" is very valuable.
Which kind of VM did you use? How did you install the mORMot server?

Offline

#5 2014-11-24 22:55:26

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: How to access a mySQL database as a Client?

I will keep you pdated on my progress as my project moves along.

At this point in time, I am running the server locally as a console (on my own Windows 8 64-bit Virtual Machine). However, the server is 'connected' to an external mySQL database that is hosted in a different state.

Offline

#6 2014-11-25 06:47:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: How to access a mySQL database as a Client?

Using Azure?

Offline

#7 2014-11-25 17:30:58

restneophyte
Member
Registered: 2014-11-18
Posts: 26

Re: How to access a mySQL database as a Client?

No, it is not Azure. It will be Amazon.

Offline

Board footer

Powered by FluxBB