- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我感觉很疯狂,我决定我真的很想用 Python 编写一个可以在 SQL Server 2008 中运行的用户定义函数。我对此很感兴趣,因为我有几千行 PL/Python 函数为 PostgreSQL 编写,我很想知道我是否可以让该项目改为在 SQL Server 上运行。
我第一次看 IronPython 试图解决我是否可以转换像这样的 C#...
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public partial class UserDefinedFunctions
{
[Microsoft.SqlServer.Server.SqlFunction]
public static SqlString Function1()
{
// Put your code here
return new SqlString("Hello");
}
};
...进入 Python。
有人对此有任何想法吗?可能吗?
我特别困惑的一点是注释:
[Microsoft.SqlServer.Server.SqlFunction]
我如何用 Python 编写它?看起来有点像装饰器:)
欢迎所有建议。
干杯,汤姆
最佳答案
根据 this article你在浪费时间尝试。显然,即使在 UNSAFE 程序集中,您也不能在 SQL CLR 中使用动态语言。
关于python - SQLCLR 和 IronPython,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3503996/
我正在审查顾问 checkin 的一些代码,并注意到他们正在使用 SQLCLR。我没有任何经验,所以我想我会研究它是关于什么的。我注意到他们使用了 Dim cn As New SqlConnectio
我正在尝试将一些现有的 C# 代码转换为 CLR 存储过程。要使用的明显连接字符串是上下文连接(“context connection = true”)。 我遇到的问题是有些事情显然不适用于这种连接类
我正在尝试创建一个可以在 Sql 中使用的 CLR 哈希函数。 我要做的是计算一行的 md5 校验和 值。如何定义函数的输入应该是一行? 例如,Sql原生的checksum函数以'expression
我的任务是获取客户端收到的电子邮件的“已读回执”,并且这些电子邮件是使用 SQLCLR 存储过程发送的。但我无法弄清楚它是如何完成的。您能否告诉我如何为电子邮件配置已读回执? 最佳答案 我原本以为使用
在 SQL-CLR 程序集中.. 有没有一种方法可以让我加载某些数据并可能从 上的数据库中读取数据仅装配负载 ? 假设我有一类用户定义的函数,这些函数使用一些正则表达式,这些表达式必须根据我在数据库中
以防其他人遇到这个问题。 Error: SQL72014: .Net SqlClient Data Provider: ... CREATE ASSEMBLY for assembly 'Assemb
既然 C# 支持可选参数,是否有一种方法可以编写 SQL CLR 存储过程,以便从 Visual Studio 发布时使用在 C# 中定义的可选参数在 SQL Server 中创建存储过程? 过去唯一
我感觉很疯狂,我决定我真的很想用 Python 编写一个可以在 SQL Server 2008 中运行的用户定义函数。我对此很感兴趣,因为我有几千行 PL/Python 函数为 PostgreSQL
我正在用 C# 构建自定义用户定义类型以用于 SQL CLR。 See this reference . 底层数据可以使用常规带符号的 32 位整数以 4 个字节表示。这是实现: [Serializa
使用 SQL Server 2008、Visual Studio 2005、.net 2.0 SP2(支持新的 SQL Server 2008 数据类型)。 我正在尝试编写一个将 DateTime2
这是我看到的一个新现象,我的数据库名称是:MySQLCLR,有一个脚本总是在其中给出这个名称: :setvar DatabaseName "MySQLCLR" 现在突然间,每次我对我的 sqlclr
根据this线程,F# Core 必须经过 SQLCLR 批准才能将程序集标记为 SAFE。这是有计划的吗?还可以吗? 最佳答案 我相信这是可以做到的。但是,F# 核心库是 Microsoft 的专有
在我们的开发服务器最近重新启动期间,SQL Server 开始使用 .NET 4.0 作为 SQLCLR。这意味着在 SQL 中使用 CLR 没有任何作用,或者至少是我通过阅读这些源代码得到的理解:
我正在尝试调用一个 .net 程序集,它包装了来自 Sql Server 的几个 COM 调用(对第三方 dll)。程序集注册正常(我尝试使用不安全和外部访问注册),但是当我运行该过程时出现此错误:
我正在尝试使用 SQLCLR 从 SQL Server 启动 Windows 程序。调用的过程没有报错,但是程序好像没有启动。 知道我可能做错了什么吗? 这是我的程序的 .NET 代码: using
我们有一个第三方 DLL,它可以对源信息的 DataTable 进行操作并生成一些有用的值,我们正在尝试通过 SQLCLR 将其连接起来,以便在 SQL Server 2008 中作为表值 UDF 进
我在 C# 6.0 .NET 3.5 CLR 程序集中编写了一些安全级别为 external_access 的代码。 精简代码: public static readonly DataTable w
我创建了一个调用如下程序集的触发器: CREATE TRIGGER Testrigger ON STATION FOR INSERT AS EXTERNAL NAME assemblytest.[W
我们有一个带有 SQL Server 2005 后端的 .NET 电子商务应用程序。新订单需要一定的“后处理”。这些任务包括发送电子邮件、创建文件、将文件上传到 FTP 服务器以及针对 WCF 数据服
有一些关于如何在 SQL Server 中使用 F# 和 SQLCLR 的博客文章很有帮助:http://richardminerich.com/2015/12/a-safer-way-to-use-
我是一名优秀的程序员,十分优秀!