Hi All,
I am a newbie to xojo, so please excuse what I write.
I would like to setup a simple database server.
My idea is.
Have my server connected to an Sqlite database.
Then have a client connect to the server via tcp or udp and they would send a sql query.
The sever would then create the json string and then broadcast this back to the client.
The client would then read the json string and update his local Sqlite database.
Has anyone any thoughts on this and any methods to get this done.
I am confident with Delphi but xojo is a new beast to me.
Any source code examples etc. would be very happily accepted.
Hey there Tom - welcome to the community. I don’t know if you need any special license to access CubeSQL - I don’t use it.
But if you want to proceed with your plan as a learning exercise I’d be happy to help. To start with you might want to look at this article. It’s a bit old at 10 years, but gives you a good start on creating a server using Xojo.
Have tried using the Client side from the demos. (and using the correct port)
It does show connected but the server does not seem to get the sql that I send to it.
[quote=130601:@Tom Duncan]Have tried using the Client side from the demos. (and using the correct port)
It does show connected but the server does not seem to get the sql that I send to it.[/quote]
Probably you have to add a EndOfLine to the sql before sending.
Thanks again for your help.
I have started an eddie demo for testing purposes.
Sofar have the name selection then Client details displaying.
Had hassles with the blob field so will wait for later to get that to work.
But thanks again, I will make the demo available for anyone to play and fix (my early xojo coding)
Have done a little playing.
To run these examples just put the sqlite database into the folder that has the server. Client & Server
Hope the link works. lol
Just tested the demo with the server on Windows.
Just in debug mode since I only purchased the MAC version (must change that)
Anyway with two debug version running with the client and server all was well under Windows 7
However, when I ran the MAC version of the client with the correct IP address it connected but no response.
Tried it the other way around, the server on the MAC received the the query but no response.
I have given firewall OK for the correct port in and out on windows and the MAC has firewall turned off.