Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
478 views

I'm creating a relatively simple SQL CLR in C#. The job of this CLR is to publish events to an Azure Event Grid Topic. I would like to be able to call this particular CLR from any number of ...
Darren Wainwright's user avatar
1 vote
2 answers
947 views

I am having a major problem where I do not know how to prevent SQL injection when writing SQL statements in CLR/C++ Below is the code String^ sqlstr = "SELECT * FROM "; sqlstr += tableName + " WHERE ...
L.A's user avatar
  • 21
1 vote
1 answer
506 views

I have a CLR assembly in SQL Server which I need to inherit a particular account's permissions. The CLR function basically just grabs a webpage and returns it to SQL in this fashion: [SqlFunction]...
Dan Scally's user avatar
  • 2,062
1 vote
1 answer
79 views

I am trying to copy the send email assembly from one database to another. I clicked on script assembly as create to and created it in the new db. When I try to send an email with the function in ...
user829982's user avatar
1 vote
1 answer
383 views

I have a REGEX SQL CLR function: var rule1 = new Regex("شماره\\s?\\d{1,10}") Calling it on SQL Server 2016, however, returns this error: System.ArgumentException: parsing "?????\s?\d{1,10}" - ...
mohas's user avatar
  • 1,951
2 votes
1 answer
837 views

I'm trying to write a log into another database inside a transaction so that the log will survive even if the transaction is rolled back. I've read this answer which says: One possibility is to use ...
Learner's user avatar
  • 675
1 vote
1 answer
1k views

I'm creating a CLR stored procedure in SQL Server 2017. I've done this many times in previous versions without any issue; however, we have recently updated to SQL Server 2017. I'm aware of the ...
Chris 's user avatar
  • 297
0 votes
0 answers
296 views

I'm following the Microsoft guide found here on how to added a named HTTPClient to my SQL Server with SQLCLR. It all seems straight forward once the HTTPClient is added and I've even got the code to ...
TP_Dev's user avatar
  • 71
0 votes
1 answer
2k views

I created a SQL Server database project (VS2017) and I added a SQLCLR C# stored procedure. It's declared like this: public static void RequestServiceToEncryptPassword(byte[] param1, out int param2, ...
TajniakOsz's user avatar
2 votes
1 answer
79 views

I was trying to answer this SO question.. Given the following TSQL code DECLARE @input1 INT = 100000 DECLARE @input2 INT = 40 DECLARE @input3 INT = 106833 DECLARE @X decimal(22,6) = 0 DECLARE @Y ...
Peter Schneider's user avatar
2 votes
2 answers
2k views

I have an issue getting SQL Server to create the stored procedure for my CLR function. This is the error I get: Msg 6567, Level 16, State 2, Procedure PerfInsert, Line 12 [Batch Start Line 0] ...
Doug Coats's user avatar
  • 7,217
1 vote
1 answer
93 views

I'm trying to start a Windows program from SQL Server using SQLCLR. The procedure called does not error, but the program does not appear to start. Any ideas what I might be doing wrong? Here is my ....
ptownbro's user avatar
  • 1,336
1 vote
1 answer
99 views

I created IBinarySerialize region in order to create my CLR for my user defined aggregate. I am trying to replicate my XIRR function in C# just to learn how to work with CLRs. I put Write and Read ...
WinstonKyu's user avatar
0 votes
1 answer
258 views

I'm using C# to build a SQL Server CLR procedure. In that I'm trying to convert a SqlString parameter to string, but the result is being truncated. Here's simplified version of the code. The ...
ptownbro's user avatar
  • 1,336
1 vote
2 answers
957 views

I have a CLR DLL (called clr.dll) which we've previously loaded and used. I'm using it to load a large number of XML files (for which we have no XSD so we can't use the fiddly XML processor in SSIS as ...
Mark Roworth's user avatar
0 votes
2 answers
611 views

I'm trying to use a third-party API that is a socket based API with SQL CLR and vb.net. I know how to do this with REST APIs, however, I cannot figure out how to get started with a Socket API. Does ...
ptownbro's user avatar
  • 1,336
0 votes
0 answers
231 views

Is there any way to implement change data capture on SQL to Azure EventHub without using exe? The code needs to run in the context of SQL Server only SQL Server Version : 2014 Tried SQL CLR with Azure ...
msmahasm's user avatar
4 votes
2 answers
3k views

Microsoft Azure Tech support has confirmed that all version of .Net 4.XX including 4.7.2 is supported in SQL Server Managed Instance CLR. We're transforming some portion of Business layer with 4.7.2 ...
Abhijeet's user avatar
  • 14.1k
-3 votes
1 answer
104 views

I am running a sql server function below on 5 different databases on sql 2016 instance: select * FROM fn_myfunction('', 0, 0,'30 Apr 2015','1', 0) And am getting this error message: Msg 10313, Level ...
Immortal's user avatar
  • 1,216
0 votes
2 answers
639 views

I've been reading all sorts of questions that are similar to what I'm trying to do, but different enough that they do not seem to apply. What I have is a C# project to create a CLR stored procedure. ...
DeadZone's user avatar
  • 1,689
2 votes
1 answer
3k views

I have migrated my on-premise SQL Server 2008 R2 databases to Azure SQL Server Managed Instance (SQL Server 2017). One database is an archive (read-only) database, one is the OLTP database, and the ...
CB_Ron's user avatar
  • 609
2 votes
2 answers
350 views

I'm comparing my custom CLR aggregate vs AVG (SQL Server 2017). My queries are: SELECT groupId, Helpers.CustomCLR(value) FROM table group by groupId SELECT groupId, AVG(value) FROM table ...
user2820173's user avatar
1 vote
1 answer
904 views

"Cannot load dynamically generated serialization assembly." error when executing a clr function that calls a web service in SQL server 2008 R2. I have a database project in Visual Studio 2017 which ...
Liz Nett's user avatar
  • 149
1 vote
1 answer
198 views

I'm using SqlClrTypes and everything is ok until I give my app to another PC. It crashes and it only works after i install SqlClrTypes on that PC. Can i somehow include it to my project?
Iavor Orlyov's user avatar
4 votes
3 answers
1k views

I am trying to write a CLR that allows me to run a WMI Query on a SQL Server. using System; using System.Data.Sql; using Microsoft.SqlServer.Server; using System.Collections; using System.Data....
Niklas's user avatar
  • 63

1 2
3
4 5
21