Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Kinda new to this stuff so apologies if my questions is not very good, or vague

I have a temperature sensor but I have been asked to make sure that readings taken by the sensor are written to a database. How do I make that connection between the database and the sensor?

Thanks

What I have tried:

Not much found from a google search, or on manuals for sensor
Posted
Updated 3-Nov-16 18:37pm
v2
Comments
[no name] 3-Nov-16 11:41am    
You don't unless your sensor can connect to a database, which is doubtful. You make the connection to your database from your application.
Member 12292743 3-Nov-16 11:46am    
"You make the connection to your database from your application"

okay so how can I go about doing this?
[no name] 3-Nov-16 12:00pm    
You google "how to connect to your database engine for your platform and programming language". I would have no idea what database engine you are using or platform or programming language you are using.

1 solution

Writing to the database is the easy part, you do it with a sql INSERT statement : SQL INSERT INTO Statement[^]

The hard parts are :
1) What kind of database you are using, (sqlite, sql server, mysql, non relational ...) ?
2) What programming language you are using?
3) What is the temp sensor hardware?
4) How you connect to the sensor hardware?
5) Is the code going to run on the hardware or not?
...

All of which you have not specified, hence your question is not answerable.

Try asking the question from who ever told you to do the project.
 
Share this answer
 
Comments
Member 12292743 4-Nov-16 4:44am    
1) mysql
2) vb 2010
3) optris ct sensor
4) sensor connected to computer via USB
Mehdi Gholam 4-Nov-16 6:26am    
Try the vendors website for a SDK.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900