也许我完全错了 - 但是由于某种原因,我无法在SQL CLR函数(VB.NET)中声明SqlGeography类型的变量。以下内容说明第3行未定义SqlGeography - 我很确定需要导入一些内容 - 但找不到它。
哦,是的 - 使用SSDT。
任何帮助都会感激。
Public Shared Sub usp_routing_dijkstra(node_1 As SqlGuid, node_2 As SqlGuid)
Dim StartGeo As SqlGeography
Using connection As New SqlConnection("context connection=true")
connection.Open()
Using command As New SqlCommand("select [geo] from [nodes] where [sys_id] = @id", connection)
Dim param As New SqlParameter("@id", SqlDbType.UniqueIdentifier)
param.Value = node_1
command.Parameters.Add(param)
Dim StartNode As Object
StartNode = command.ExecuteScalar()
If StartNode IsNot Nothing Then
End If
End Using
End Using
End Sub