Shop OBEX P1 Docs P2 Docs Learn Events
SQL Client — Parallax Forums

SQL Client

BeagleBeagle Posts: 7
edited 2010-12-27 19:05 in Propeller 1
I've my propeller successfully talking to a couple of sensors and I've it also wired to a WIZ105SR (UART to ethernet module). I'm able to netcat from my linux computer to the WIZ105SR which passes plain text back and forth (puTTY from my Windows computers also works). viola!

My next milestone is to try to log sensor data to my SQL Anywhere 10 database. I have the SQL server running on a XP computer with a static-private IP address.

Does anyone know how I might create a SQL connection directly to the database server from the propeller? (I know I can create a small program in the XP computer to act as a middleman, but I think having the propeller talk directly to the database would be more elegant).

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2010-12-27 14:54
    I think it's to much efford. I'd simply use a XAMPP setup to connect to the database. I'd expect HTTP to be easier than implementing a SQL client.

    You could even store the SQL statements in PHP and the propeller only has to send the data. With the XAMPP running you could also visualize the sensor-data, so you'd only need a browser to check the data.

    I think from propeller point of view this is more elegant, because it shifts workload to the PC, where you usually have more horsepower ;o)
  • wjsteelewjsteele Posts: 697
    edited 2010-12-27 14:58
    It'll be a whole lot easier if you simply loaded something like a webservice on a server and used it to store the data in the SQL datastore. Implementing the necessary protocols on the prop would more than likely consume a significant amount of space and time to accomplish. There are already libraries available for the http calls necessary for using webservice calls.

    I know that SQL Anywhere supports a variety of clients like ASP.NET and PHP so the service would be trivial to implement. (I know you said you didn't want to implement a middleman, but it's by far the best way in this case.)

    Bill
  • Mike GMike G Posts: 2,702
    edited 2010-12-27 19:05
    A middle-ware component can be exposed to many different devices or other services.
Sign In or Register to comment.