小编Sma*_*EGA的帖子

如何获取SQL Server 2000查询中的当前行号?

如何使用ROW_NUMBER()不支持该功能的SQL Server 2000在SQL查询中获取行号?

sql sql-server sql-server-2000

5
推荐指数
1
解决办法
8899
查看次数

不允许UPDATE,因为语句更新视图"table_name",它参与连接并具有INSTEAD OF UPDATE触发器

我在存储过程中执行以下查询时收到以下错误.任何人都可以帮助找到错误?

不允许UPDATE,因为语句更新视图"sup_item",该视图参与连接并具有INSTEAD OF UPDATE触发器.

UPDATE si
SET 
    name = mc.name,
    sup_item_cat_id = mc.res_sup_item_cat_id,
    xf_value = mc.xf_value,
    ava_start_date = mc.ava_start_date,
    ava_end_date = mc.ava_end_date,
    status_code = mc.status_code,
    last_mod_us_id = CASE WHEN mc.last_mod_us_id = 42 THEN @posting_us_id 
                     ELSE mc.last_mod_us_id END,
    last_mod_tsp = CURRENT_tsp
FROM sup_item AS si
    JOIN merch_cat_imp_sup_item AS mc
        ON mc.sup_id = si.sup_id
        AND mc.res_sup_item_id = si.sup_item_id
        AND mc.cat_imp_event_id = @cat_imp_event_id
        AND mc.accept_flag = 'y'
WHERE si.shi_flag = 'n'
Run Code Online (Sandbox Code Playgroud)

我找到了参考资料:http://msdn.microsoft.com/en-us/library/ms177523.aspx

具有INSTEAD OF UPDATE触发器的视图不能是具有FROM子句的UPDATE的目标.

所以,我必须重写UPDATE语句(它仍然可以在一个过程中)不使用sup_item(这是一个视图),但保留基础表(如果需要).

如果有人知道该怎么办,有人可以重写吗?

sql t-sql sql-server sql-server-2005

5
推荐指数
2
解决办法
5835
查看次数

HTML编码无法正常使用URL

我正在尝试生成一个URL:

GET-IT-一起-斯塔夫罗斯 - Zenonos放大器; -Katerina柯视图模式= 0

在哪里可以看到"amp;" 之后网址没有生成

如下所示:

GET-IT-一起-斯塔夫罗斯 - Zenonos放大器

请参阅下面的代码,该代码生成URL

<a class="fb-xfbml-parse-ignore" href="https://twitter.com/intent/tweet?url=<%=HTMLEncode(CMS.DocumentEngine.DocumentContext.CurrentDocument.AbsoluteURL)%>" onClick="return popup(this, 'notes')">  
 <img src="<%# Eval("twittericon") %>" alt="twitter icon" />
</a>
Run Code Online (Sandbox Code Playgroud)

你能帮助我生成完整的URL吗?

html javascript jquery html-encode kentico

5
推荐指数
1
解决办法
562
查看次数

ViewChild 在角度 13 中未定义

我试图从父组件调用子组件的视图子组件,但在控制台中未定义。

查看图像还可以看到相同的堆栈火焰

https://stackblitz.com/edit/angular-ivy-k4m2hp?file=src%2Fapp%2Fhello.component.ts

查看图像还可以看到相同的堆栈火焰

import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { TestChildComponent } from './test-child/test-child.component';

@Component({
  selector: 'hello',
  template: `<h1>this is Hello component {{name}}!</h1>`,
  styles: [`h1 { font-family: Lato; }`],
})
export class HelloComponent {
  @Input() name: string;
@ViewChild('TestChildComponent') testChildComponent: TestChildComponent
  ngOnInit() {
    console.log('calling ngOninit in hello component');
    console.log('going to call test child instance this.TestChildComponent.ngOninit')
   console.log(this.testChildComponent);
  }
}
Run Code Online (Sandbox Code Playgroud)

请帮忙获取子组件

this.testChildComponent

这样我就可以从父级调用子级的 ngOnInit 。

this.testChildComponent.ngOnInit()

html javascript typescript angular angular13

5
推荐指数
1
解决办法
2万
查看次数

对象或列名称缺失或为空

我收到以下错误

对象或列名称缺失或为空.对于SELECT INTO语句,请验证每列是否具有名称.对于其他语句,请查找空别名.不允许使用定义为""或[]的别名.添加名称或单个空格作为别名.

对于查询显示如下:

CREATE         PROC [dbo].[Sp_Table1] @ctlg_ipt_event_id int
AS
SET NOCOUNT ON

DECLARE @current_status NCHAR(1), @ready_status_code NCHAR(1)
DECLARE @current_action NCHAR(1), @ready_action_code NCHAR(1), @done_action_code NCHAR(1)
DECLARE @pst_user_id int


SELECT @current_status =  status_code 
      ,@current_action =  action_code
      ,@pst_user_id = last_mod_user_id
  FROM merch_ctlg_ipt_event 
 WHERE ctlg_ipt_event_id = @ctlg_ipt_event_id

Select @ready_status_code = 'o'
, @ready_action_code = 'a'
, @done_action_code = 'b'

IF @current_status <> @ready_status_code OR @current_action <> @ready_action_code
BEGIN
RETURN 
END


BEGIN TRAN

declare @rows int
  ,@err int
  ,@i int
  ,@name nvarchar(50) --COLLATE SQL_AltDiction_Pref_CP850_CI_AS …
Run Code Online (Sandbox Code Playgroud)

sql t-sql sql-server sql-server-2005

4
推荐指数
1
解决办法
1万
查看次数

传递到字典中的模型项的类型为'System.Threading.Tasks.Task`1 [System.Collections.Generic.IEnumerable`

运行我的mvc应用程序时出现以下错误:

{"The model item passed into the dictionary is of type 
'System.Threading.Tasks.Task`1[System.Collections.Generic.IEnumerable`
1[PM.CManager.Clm.Domain.Models.Ln]]', b
ut this dictionary requires a model item of type 'PM.CManager.Clm.Domain.Models.Ln'."}
Run Code Online (Sandbox Code Playgroud)

以下是我的控制器返回值:

 public ActionResult ClaimDetail()
        {
            //return View();
            string id = "1000000246";
             if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            var LnDetail = _LnProxy.GetLnDetailByLnNum((string)id);
            if (LnDetail == null)
            {
                return HttpNotFound();
            }
            return View(LnDetail);
        }
Run Code Online (Sandbox Code Playgroud)

以下是我的观点:

@model PM.CManager.Clm.Domain.Models.Ln
   @using (Html.BeginForm())
   {
       <div class="panel panel-primary">

           <div class="panel-heading inform" style="">
               <table clases="panel-title inform">
                   <tr>
                       <td class="inform">Ln Number: <label …
Run Code Online (Sandbox Code Playgroud)

.net c# model-view-controller task-parallel-library

4
推荐指数
1
解决办法
3742
查看次数

在Git中存储Web.config

我对将Web.config文件存储在Git-hub中有疑问,是否建议这样做?

这不是安全漏洞吗?

同样,用于不同环境的web.config在不同的环境中也会有所不同,因此如何保持不同版本的web.config是相同的仓库和分支?

.net c# asp.net github

4
推荐指数
1
解决办法
994
查看次数

Angular 4 ng-show

我需要根据下拉列表中选择的值隐藏和显示文本框.

这已经在Angular 1中完成了,但是如何在Angular 4中完成.

<div ng-app ng-controller="Controller">
    <select ng-model="myDropDown">
          <option value="one">One</option>
          <option value="two">Two</option>
          <option value="three">Three</option>
    </select>

    <input ng-show="myDropDown=='two'" type="text">
</div>


function Controller ($scope) {
    $scope.myDropDown = 'one';
}
Run Code Online (Sandbox Code Playgroud)

Angular 1中的小提琴

angularjs angularjs-directive angular

4
推荐指数
1
解决办法
7115
查看次数

类似于amazon ses的google smtp服务是什么,是gmail smtp吗?

类似于amazon ses的google smtp服务是什么,是gmail smtp吗?我已经使用 amazon ses smtp 通过在我的服务器中进行配置来发送营销电子邮件。所以google有类似的服务,还是和smtp.gmail.com一样?

cloud smtp smtpclient amazon-web-services google-cloud-platform

4
推荐指数
1
解决办法
2107
查看次数

用于检查浏览器中启用的 TLS 1.2 的 Powershell 脚本

我可以有一个脚本来检查以下位置的注册表中启用的 tls 1.2。

\n

\xe2\x80\xa2 HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Client\\DisabledByDefault 存在,该值应为 0。

\n

\xe2\x80\xa2 HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Client\\Enabled 存在,值应为 1。

\n

https://support.site24x7.com/portal/en/kb/articles/how-to-check-if-tls-1-2-is-enabled

\n
$path = @(Get-ItemProperty HKLM:\\SYSTEM\\ControlSet001\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Client\\Enabled)  -and @(Get-ItemProperty HKLM:\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\TLS 1.2\\Client\\DisabledByDefault)  -ErrorAction SilentlyContinue\nif ($null -eq $path) {  # Always place $null on the LHS\n  \'not found\' \n}\n
Run Code Online (Sandbox Code Playgroud)\n

如何使用 powershell 脚本检查浏览器(而不是注册表)中启用的 TLS 1.2?

\n

browser powershell scripting powershell-4.0 tls1.2

4
推荐指数
2
解决办法
6万
查看次数