SCRIPT5007错误:无法获取未定义或空引用的“settings”属性。

4
CREATE  FUNCTION [dbo].[PMURP_Func_ParseArray] (@Array VARCHAR(1000),@separator CHAR(1))
RETURNS @T Table (ExtractWords varchar(50))
AS 
BEGIN
--DECLARE @T Table (col1 varchar(50))
-- @Array is the array we wish to parse
-- @Separator is the separator charactor such as a comma
DECLARE @separator_position INT -- This is used to locate each separator character
DECLARE @array_value VARCHAR(1000) -- this holds each array value as it is returned
-- For my loop to work I need an extra separator at the end. I always look to the
-- left of the separator character for each array value

SET @array = @array + @separator

-- Loop through the string searching for separtor characters
WHILE PATINDEX('%' + @separator + '%', @array) <> 0 
BEGIN
-- patindex matches the a pattern against a string
SELECT @separator_position = PATINDEX('%' + @separator + '%',@array)
SELECT @array_value = LEFT(@array, @separator_position - 1)
-- This is where you process the values passed.
INSERT into @T VALUES (@array_value) 
-- Replace this select statement with your processing
-- @array_value holds the value of this element of the array
-- This replaces what we just processed with and empty string
SELECT @array = STUFF(@array, 1, @separator_position, '')
END
RETURN 
END

并且

Select Description from Bad_Names WHERE Description in (Select * from dbo.PMURP_Func_ParseArray('bala',' '))

并且。
Description,Name_ID
PK_BadNames nonclustered, unique, primary key located on PRIMARY    Description

2
jQuery 版本為 1.8.3 。 - Rooney
1
你使用的是哪个jQuery版本?$.data已更改为$._data。 - A. Wolff
尝试升级您的插件/ jQuery或使用jQuery迁移。 - A. Wolff
我不知道,请在你那边进行一些测试。 - A. Wolff
.validate()是初始化方法,通常在DOM准备就绪时调用一次,而不是在按钮点击时调用。单击将自动捕获并由插件处理。 - Sparky
显示剩余4条评论
4个回答

8
在我的情况下,我有一个嵌套的 <form></form> 表单导致了这个错误。

2
我的问题与Tuyen Nguyen的回答有关——一个表单标签嵌套在另一个表单标签内。
在使用Bootstrap模态对话框div时——这是一个用于表单部分视图的容器——
<div id="modal-container" class="modal fade" tabindex="-1" role="dialog">

我错误地将modal-container div放在@using Html.BeginForm语句的标签中,这导致Script 5007错误。

将其放在Html.BeginForm大括号之外可以消除错误。

@using (Html.BeginForm("Edit", "Home", FormMethod.Post))
{

 }

1
我们在尝试对一个不是实际表单元素的元素调用validate()时遇到了这个错误。例如:$('div#entryForm').validate() 当我们将jQuery选择器更改为选择根表单元素时,就没有问题了:
$('form#form1').validate()

0

有人在使用 Knockout js 吗?

我知道这是一个旧帖子,但当我搜索时它是谷歌的第一个结果。所以,如果这能帮助其他人... 对我来说,问题在于在应用 knockout 绑定之前调用 $(form).validate()。

我将 validate 调用与加载对话框的表单放在了一起,因此它在加载时运行,然后应用 knockout 模型。我将 validate 调用移动到了 dialogReady 函数中,并在 knockout 之后调用它 - 问题解决了。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接