Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello ,
My project is GPS vehicle tracking system,in this project i have to fetch data(i.e latitude and longitude) from device , it(GPS device) sends the data through ip address with port number to server, so my doubt is how can i route that data into my database & particular table?
Ex: SERVER IP:122.178.137.22
server contains some databases,
My data base name GPSAPP, it contains table which is GPSApi_Table,
and GPS device sends data to SERVER IP(122.178.137.22) the data as follow as ..
C#
imei:353451044508750,001,0809231929,,F,055403.000,A,2233.1870,N,11354.3067,E,0.00,,;

C#
i.e device can send data to ip address only


my porblem is above data has to be route(store into GPSAPP database& GPSApi_Table)

how can i do it?
Posted
Updated 11-Jan-16 20:09pm
v2
Comments
deepankarbhatnagar 12-Jan-16 1:27am    
Please explain more & what have your trying please show your code too..
sakthivel vel 12-Jan-16 2:12am    
sir ,kindly check my question now,I have explained clearly,,
Richard MacCutchan 12-Jan-16 3:41am    
You need an application running on the server and listening on that port to receive the GPS messages, and insert the information into your database.

1 solution

It really depends on how the GPS data is stored on the server and what your options are to get to that data. If it is in plain text and the data is accessible on the server where you are able to execute the ETL through for example a cifs share you could load the data by doing a something like:

SQL
BULK INSERT dbo.GPSApi_Table
   FROM 'some_location/gpsdata'
   WITH 
      (
         FIELDTERMINATOR =',',
         ROWTERMINATOR =' \n'
      );


The table has to reflect the data you extract. Otherwise you need to do some transformations before you load the data in to sql server. Some validations would be welcome as well of course.

My suggestion would be to take a look at SSIS to help you build the ETL. After you build and tested it you can then schedule it in SQL Server to run periodically in production.

Hope this helps you

Harold
 
Share this answer
 

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