正则表达式中方括号和括号之间有什么区别?(What is the difference between square brackets and parentheses in a regex?)
这是一个我在JavaScript中使用的正则表达式:
var reg_num = /^(7|8|9)\d{9}$/
这是我的团队成员建议的另一个。
var reg_num = /^[7|8|9][\d]{9}$/
规则是验证电话号码:
- 它应该只有十个数字。
- 第一个数字应该是7,8或9中的任何一个。
Here is a regular expression I created to use in JavaScript:
var reg_num = /^(7|8|9)\d{9}$/
Here is another one suggested by my team member.
var reg_num = /^[7|8|9][\d]{9}$/
The rule is to validate a phone number:
- It should be of only ten numbers.
- The first number is supposed to be any of 7, 8 or 9.
原文:https://stackoverflow.com/questions/9801630
最满意答案
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies
是64位系统上正确的文件夹位置(或C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies
)。您需要添加引用:
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Smo.dll
Microsoft.SqlServer.Management.Sdk.Sfc.dll
Microsoft.SqlServer.SqlEnum.dll
(这些是构建SMO应用程序所需的最小文件)
对于SQL Server 2016,此位置为
C:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies
(对于64位版本)。参考: 如何:在Visual Studio .NET中创建Visual C#SMO项目
SQL Server管理对象(SMO)可作为相关SQL Server(20XX)功能包的一部分下载(检查小印,因为我不认为这些可重新分发?)
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies
is the correct folder location (orC:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies
on 64-bit systems).You need to add references to:
Microsoft.SqlServer.ConnectionInfo.dll
Microsoft.SqlServer.Smo.dll
Microsoft.SqlServer.Management.Sdk.Sfc.dll
Microsoft.SqlServer.SqlEnum.dll
(These are the minimum files that are required to build an SMO application)
For SQL Server 2016, this location is
C:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies
(for the 64bit version).Ref.: How to: Create a Visual C# SMO Project in Visual Studio .NET
The SQL Server Management Objects (SMO) are downloadable as part of the relevant SQL Server (20XX) Feature Pack (check the smallprint as I don't believe these are redistributable?)
相关问答
更多-
没人帮我猜! 所以我试着自己找到答案。 我在其他论坛上发现的是: 在这个文件夹下找到了dll: C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies 要在您的网站中添加它们,使用WebMatrix将需要一些帮助程序; 因为我使用WebMatrix而不是Visual Studio。 所以为此,我需要一些东西: @using Helper.Name; 对我来说问题是这个dll没有安装在Windows 8中。并且无法运行所以异常出现了。 Nobody ...
-
C:\ Program Files \ Microsoft SQL Server \ 100 \ SDK \ Assemblies是正确的文件夹位置。 您需要添加对以下内容的引用: Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Smo.dll Microsoft.SqlServer.Management.Sdk.Sfc.dll Microsoft.SqlServer.SqlEnum.dll (这些是构建SMO应用程序所需的最小文 ...
-
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies是64位系统上正确的文件夹位置(或C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies )。 您需要添加引用: Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Smo.dll Microsoft.SqlServer.Management.Sdk.Sfc.dl ...
-
已解决:基于对另一个问题的评论我运行SQL事件探查器来确定MSSMS使用的功能,发现它使用的是master.dbo.xp_dirtree,能够在我的应用程序中复制它。 SOLVED: Based on a comment for another question I ran SQL Profiler to determine what functions MSSMS was using, found it was using master.dbo.xp_dirtree, was able to duplic ...
-
我发现了这个问题。 我正在构建项目,引用SQL 2005 SDK DLL。 我删除了所有引用并再次添加引用(现在指向SQL 2008 dll视图帖子: http : //msdn.microsoft.com/en-us/library/ms162129.aspx )以获取要添加的引用列表。 此外,目标计算机需要安装Microsoft SQL Server 2005向后兼容组件和Microsoft SQL Server 2008管理对象和SQL Server系统CLR类型(2008)。 I found the ...
-
我很确定当我使用那些我总是通过浏览DLL本身添加的那些(但我们仅限于2005年的工作)。 I'm pretty sure when I've used those I've always added by browsing to the DLLs themselves (but we're restricted to 2005 at work).
-
我可以在SQL Server安装的同一目录中看到两个dll: c:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.ConnectionInfo.dll c:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Smo.dll 使用VS 2015和.net 4.5.2我能够引用这两个dll,构建并运行使用Serv ...
-
您希望安装位于XMO包中的管理对象: Management Objects Collection软件包包含SQL Server 2005管理API的几个关键元素,包括分析管理对象(AMO),复制管理对象(RMO)和SQL Server管理对象(SMO)。 开发人员和DBA可以使用这些组件以编程方式管理SQL Server 2005。 注意:Microsoft SQL Server 2005管理对象集合需要Microsoft Core XML服务(MSXML)6.0和Microsoft SQL Server ...
-
因为“在SQLCLR中禁用了此功能”。 SMO框架检测到您在SQL CLR中并拒绝工作。 其原因可能是微软将这一切付诸实施的成本很高,这是一个正当的理由。 为什么不从客户端程序中恢复数据库,就像消息所示? Because "This functionality is disabled in the SQLCLR". The SMO framework detects that you are in SQL CLR and refuses to work. The reason for that is pro ...
-
如果您说微软文档声明它仅支持SQL Server 2012 +,因为: 这将是不正确的,并没有正式说明它支持和不支持的版本。 SMO的处理方式与SQL Server Management Studio类似。 您可以使用新版本连接到任何版本的SQL Server。 唯一的规定是某些属性或类会因SQL Server较低版本中不存在的属性而失败,或者功能不可用(例如,SQL Server 2008 R2上的AvailabilityGroup名称空间将失败)。 例如,在PowerShell模块dbatools中,我 ...