Posted on: 2/11/2015 11:48:00 AM | Views : 511

hi all 
iam displaying latitute and longitude values in 2 lables(lat.text,lon.text) and those values are 23.0204185967655254,75.1254896541566
and now i want to convert label.text to double (23.020,75.125) upto 3 decimals
iam trying like this
double x = Convert.ToDouble("lat.text"); double y = Convert.ToDouble("lon.text"); try { // PostgeSQL-style connection string string connstring = String.Format("Server=localhost;Port=5432;User Id=postgres;Password=mpssdi@123;Database=mpdb;");
// Making connection with Npgsql provider NpgsqlConnection conn = new NpgsqlConnection(connstring); conn.Open(); // quite complex sql statement string sql = "SELECT * FROM industry_land where latitude= @ x and longitude= @ y"; // data adapter making request from our connection NpgsqlDataAdapter da = new NpgsqlDataAdapter(sql, conn); // i always reset DataSet befor ...

Go to the complete details ...