Page 1 of 1

MS SQL Server Import

Posted: Wed 23 Feb 2011 6:16 am
by spyker
I've hashed a small VB.NET app together to extract the data from Cumulus and import it into SQL for data manipulation with something like Excel, Crystal Reports etc.

It runs on a timer and imports the live data every minute.

Anybody interested in the source code?

Re: MS SQL Server Import

Posted: Wed 23 Feb 2011 1:33 pm
by spyker
Ok, attached is the source project. I'm no programmer but it seems to do the trick.

The only tags I was interested in was;

Code: Select all

<#date>;<#hour>:<#minute>;<#temp>;<#hum>;<#dew>;<#wspeed>;<#wgust>;<#bearing>;<#rrate>;<#rfall>;<#press>;<#ryear>;<#intemp>;<#inhum>;<#wlatest>;<#wchill>;<#heatindex>;<#battery>
Because my console is not connected to a power supply I wanted to chart the battery voltage to see how long a set of batteries will last.

Installation

I created a a text file webtags.txt, containing only the tags I'm interested in, and have Cumulus process the file and upload it to my web server.

My app process this webtags.htm file and parses the data and imports it into SQL. The SQL script to create the table is included in the RAR file.
Because the webtags.htm file is residing on my web server my app can process the data remotely.
I have plans to convert it to a windows service so will post the update here when complete.

Please remember to change the URL of the webtags.htm file and the connection string in the app.config file.

Re: MS SQL Server Import

Posted: Wed 23 Feb 2011 2:23 pm
by daj
You could use the local copy of the processed webtag file rather than pulling it back down from the webserver each time.

Once Cumulus processes a file it leaves a tmp with all the processed data. So if it was processing webtag.txt there will be a webtag.txttmp in the same folder on the PC

Re: MS SQL Server Import

Posted: Wed 23 Feb 2011 3:26 pm
by spyker
Yes, but that is the whole purpose of this app, to be able to pull the data over the internet from one site to another.