1

C# でを作成し、SpatialObjectを介して SQL Server データベースに渡そ うとしていますDataSetが、DataSet:/

DSのパラメータに要素を追加しようとすると、パラメータとして取得されます

CONVERT(geography, '') 

オブジェクトを DS に渡す方法はありますか、それともストアド プロシージャを介して行う必要がありますか?

これが私が使用している私のコードの一部です

SqlGeographyItem.BeginGeography(OpenGisGeographyType.Point);

string RadioLatLng = Points.Remove(Points.Length - 1);
string[] tokens = RadioLatLng.Split(',');

decimal.TryParse(HiddenRadio.Value, out Radio);

SqlGeographyItem.BeginFigure(Convert.ToDouble(tokens[1]), Convert.ToDouble(tokens[0]));
SqlGeographyItem.EndFigure();            
SqlGeographyItem.EndGeography();

SqlGeographyFig = SqlGeographyItem.ConstructedGeography;
SqlGeographyFig.STBuffer(Convert.ToDouble(Radio));

DS_GeofenceTableAdapters.Geofence1TableAdapter ta_geocercas = new DS_GeofenceTableAdapters.Geofence1TableAdapter();
DS_GeofenceTableAdapters.GeofenceClientTableAdapter tagc = new GeofenceClientTableAdapter();

int IdGeo = Convert.ToInt32(ta_geocercas.InsertQuery(4, this.txt_nombre.Text, Type, Points, Buffer, DateTime.Now, "Active", Radio, Color, route));
4

0 に答える 0