Hey doug,
In the "real" world (my day job), i'm a Sr. MS-SQL DBA, responsible for all the MS-SQL servers in the whole datacentre. Hence my MS-SQL expertise.
Even though all SQL versions share the ANSI '83 or '92 SQL standards they are FAR from equal. Especially the variations in the TDS (tabular data set) sub-protocols/versions are killing.
And since MS-SQL has a really good freeware version, I think my efforts are best spent on the parts that i do know, intimately... on a daily basis... down to the bone / protocol / networking layer.
For the parts there is overlap, and i can help, i will try to.
And moving to postgress??? nya... i'd think twice about that one. It's called the P word in our office, and we do have to support the damn thing, but NO one wants to maintain it. The rest of us Oracle / MySql / NoSql / MsSQL / IBM DB2 / SyBase / etc etc DBA's at our office steer clear if we can help it.
And yes, offcourse i'm biased, But i know nice things can be built on the database the devil has spawned <evil grin>.
Theo (nl)
Hi
Just put together some code to get an mbed to populate an sql database.
the mbed access the website with a querystring and website uses the vb function Request.QueryString to write to the database.
here is the vb at the webserver
Imports System.Data.SqlClient
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Get the values from Query string
'TextBox1.Text = Request.QueryString("ID")
'TextBox2.Text = Request.QueryString("TIME")
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
myConnection = New SqlConnection("server=localhost\SQLEXPRESS;Trusted_Connection=True;database=accesscontrol")
'establishing connection
Try
myConnection.Open()
'opening the connection
myCommand = New SqlCommand("INSERT INTO log VALUES ('" + Request.QueryString("ID") + "', " + Request.QueryString("TIME") + ", " + Request.QueryString("DOOR") + ")", myConnection)
myCommand.ExecuteNonQuery()
myConnection.Close()
Catch ex As Exception
TextBox1.Text = ex.ToString
End Try
End Sub
End Class
and the moded code from the ethernet example
#include "mbed.h"
#include "HTTPClient.h"
DigitalOut led(LED1);
HTTPClient http;
/**
* Request a google search for HelloWorld and display the first 2000 characters
* of the page source on the serial terminal.
*/
int main(void) {
char url[256];
char result[2000];
// Insert the search term into the URL
sprintf(url, "http://xxx.xxx.xxx.xxx/default.aspx?id=mbed&time=35&door=12");
// Request 2000 characters from the result. Default is 64.
http.get(url, result, 2000);
// Display the result
printf("%s\n", result);
// Work is done!
while(1) {
led = !led;
wait(0.2);
}
}