Connect to SQL Server from a microcontroller (Arduino or Fez with .Net Micro Framework)

I'm looking for examples, tutorials, or just β€œthis + this + this should work” to read and write to a SQL server (2008) from a microcontroller such as an Arduino board. I also reviewed (and probably will go) with .Net Micro Framework devices like Fez Cobra . Micro Framework does not include ADO. I am sure that this will be associated with some XML, but I can’t understand what technology is for further research. I do not want the PC application to serve as an intermediate.

Thank!

+5
source share
6 answers

, , - , protobuf, .

, TDS AVR.

+5

- , ... "arduino" , Arduino, , .NET-. , .

1:

Arduino SQL- Serial-, :

Serial.begin(115200);
Serial.println("INSERT INTO table_name VALUES (value1, value2, value3,...);");

( , ) script, . CLI . Windows/.NET .., GNU/Linux, python mysql, , , - (BEWARE: UNTESTED!):

import os, serial

self.ser = serial.Serial("/dev/ttyUSB0", 115200)
query = self.ser.readline().strip()
return os.popen("mysql -u<my_usr> -hlocalhost -p<my_pass> -e" + query)

2: lan LAN Arduino

(. , ). . (. docs ). - (UNTESTED):

Serial.begin(<speed>);
Ethernet.begin(<mac_number>, <ip>);
Client client(<server>, <port>);
client.println("GET <path> HTTP/1.0");
while (client.available()) {
  char c = client.read();
  Serial.print(c);
}

!

+1

, XML-, Microsoft SQL Server, , , SQL-.

0

:

1.0 -.

-, sql, ADO .

2.0 .

:

2. - Soap HTTP , .

2b. TDS sql .

0

HTTP SQL Server, HTTP put.

0
-1
source

All Articles