Discussion forum about Comet system products
You are not logged in.
Hi,
Does the T3510 can write directly in a SQL server 2008 database? If yes, how do I setup it to do this? I would like the datalogger to write directly in the database in order that no software would be required.
Thank you,
T3510 with 02.47 / 1-5-2.04 firmware
Offline
Hello,
T3510 is not able to write directly into SQL database. For this purpose can be use SOAP protocol.
You need to only install on your web server a small C# script. SOAP example:
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Xml.Linq; using System.IO; using System.Text; using System.Web.Services.Description; namespace TransmittersWebService { /// <summary> /// Example of web service for obtaining values from Tx5xx transmitters /// </summary> [SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)] [WebService(Namespace = "http://cometsystem.cz/schemas/soapTx5xx_v2.xsd")] public class TransmittersSoap : System.Web.Services.WebService { [WebMethod(Description = "Example of processing sample from Tx5xx sensor.")] public bool InsertTx5xxSample(string passKey, string device, string temp, string relHum, string compQuant, string pressure, string alarms, string compType, string tempU, string pressureU, string timer) { string data = "Time: " + DateTime.Now.ToString() + ", serial number: " + passKey + ", Temp: " + temp + ", RH: " + relHum + ", alarms: " + alarms; FileStream fs = new FileStream("d:\\temp\\soap.log", FileMode.Append); StreamWriter w = new StreamWriter(fs, Encoding.ASCII); w.WriteLine(data); w.Flush(); w.Close(); fs.Close(); return true; } } }
This code create file with values on your server. You can insert your SQL code instead writing to file.
Jan
Offline
Thank you, but what do you mean to install on my web server?
Offline
You need to add C# source file into your IIS ASP .NET server. SOAP you can also use with Apache + PHP. Introduction into SOAP protocol you find here: http://www.w3schools.com/soap/default.asp. Also you can buy a database solution from us: www.cometsystem.cz/products/reg-DBS
Offline