Question: I am trying to pass parameters to my stored procedure. They are like this

```
@p_latitude='',@p_longitude='',@p_miles='',@p_searchtext='',@p_maptownid=182,@p_regionid=0

```

From code I am passing the parameters like 

```
cmd.Parameters.Add("@p_latitude", SqlDbType.NVarChar).Value="''";
cmd.Parameters.Add("@p_longitude", SqlDbType.NVarChar).Value="''";
cmd.Parameters.AddWithValue("@p_miles",0);
cmd.Parameters.Add("@p_searchtext",SqlDbType.NVarChar).Value="''";
cmd.Parameters.AddWithValue("@p_maptownid",maptownid);
cmd.Parameters.AddWithValue("@p_regionid",0);

```

I'm getting an error `cannot convert navarchar to float`.
I tried in different ways sending null, string.empty. But couln't find it.

Answer: 
Empty strings should be passed as `""` not `"''"`. The apostrophes (`'`) will be passed in as the string value and not as string delimiters. 
The error message says you have a float column that you pass a nvarchar. I suspect that the @p\_latitude and @p\_longtitude params is the problem. Try to set the value directly as DBNull.Value.
I'm guessing that latitude, longitude and miles are floating point numbers. If so, you need to pass them as such:

```
cmd.Parameters.AddWithValue("@p_latitude", 0.0);
cmd.Parameters.AddWithValue("@p_longitude", 0.0);
cmd.Parameters.AddWithValue("@p_miles", 0.0);

```