VB.net Dll Functions in SQL Server

Shafer, Brian A. (NSGAL) 1 Reputation point
2021-03-05T01:38:38.487+00:00

I have a dll written in vb.net. i added a class with some functions that require a date/time for the function and return a string. The functions work fine in a test app. However i want to add that assembly to an SQL server and have a function in SQL to execute the code. I can create the assembly in SQL Server no errors. I would have thought the functions would show up under Scalar functions, but nothing. Any ideas on what i am missing or directions to where i can find valid info? BTW, i've not used forums in ages.. hopefully i am in the right spot.

SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-03-05T03:18:28.967+00:00

    Hi @Shafer, Brian A. (NSGAL) ,

    Please check your steps follow MS document CLR Scalar-Valued Functions to check if you missing some steps when you create Scalar Function in SQL server. Please make sure the SQL server query running under the correct database.

    I am not familiar with VB.net environment, so I can only do a simple test for you.

    74611-screenshot-2021-03-05-110542.jpg

    74612-screenshot-2021-03-05-110603.jpg

    If I misunderstood your issue, please let me know.


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Olaf Helper 47,436 Reputation points
    2021-03-05T06:34:33.517+00:00

    Any ideas on what i am missing

    Just adding a CLR assembly is not enough, how should SQL Server know what to appose how? You have to Create CLR Functions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.