TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gary Hale
NA
32
1.9k
Using this CLR TVF What does the C# Method look like (HELP)
Jan 5 2019 9:47 AM
using this CLR TVF what does the CE method(s) look like
CREATE FUNCTION [dbo].[fnAddressCoordinates](@addressLine [NVARCHAR](MAX), @city [NVARCHAR](100), @state [NVARCHAR](2), @zip [NVARCHAR](15))
RETURNS TABLE (
[address] [NVARCHAR](MAX) NULL,
[city] [NVARCHAR](MAX) NULL,
[state] [NVARCHAR](MAX) NULL,
[zip] [NVARCHAR](MAX) NULL,
[lat] [DECIMAL](18, 6) NULL,
[lon] [DECIMAL](18, 6) NULL
) WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [GoogleGeocodeAPI].[GoogleGeocodeAPI.GoogleGeocodeAPI].[AddressCoordinates]
----
Example C# code
[SqlFunction(FillRowMethodName = "AddressCoordinates",
TableDefinition = "address nvarchar(50), city nvarchar(50), state nvarchar(50), zip nvarchar(50), latitude Decimal, longitude Decimal")]
public static IEnumerable BuildArray(SqlString address, SqlString city, SqlString state, SqlString zip)
{
...
GeoCode Req = new GeoCode
{
address = address.ToString(),
city = city.ToString(),
state = state.ToString(),
zip = zip.ToString(),
latitude = 0,
longitude = 0
};
// Results
ArrayList resultCollection = new ArrayList();
resultCollection.Add(Req);
return resultCollection;
Reply
Answers (
0
)
connect u.r.u digitalpersonal with vb.net and sql
Web Api token authorization