我总是使用以下脚本上传经典asp文件,但它停止工作给我这个错误
vbscript运行时错误800a01a8
对象需要'Item(...)'
我调查了一下,我认为问题是在文件upload.asp中使用BuildUploadRequest函数,但我真的不明白为什么
<form method="POST" action="landing-page.asp" ENCTYPE="multipart/form-data">
<input type="file" name="file">
<input type="hidden" name="key" value="0">
<input type="submit" name="send" value="1">
</form>
Run Code Online (Sandbox Code Playgroud)
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest(RequestBin) '//function defined in upload.asp
if UploadRequest.Item("key").Item("Value")="0" then '//this is the line giving the error
'//code here...
end if
Run Code Online (Sandbox Code Playgroud)
Sub BuildUploadRequest(RequestBin)
PosBeg = 1
PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13)))
boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg)
boundaryPos = InstrB(1,RequestBin,boundary)
'//Get all data inside the boundaries
Do until (boundaryPos=InstrB(RequestBin,boundary & getByteString("--")))
'//Members …Run Code Online (Sandbox Code Playgroud) 我正在使用BIML构建多个SSIS包,我必须在日期间隔之间从OLE DB源检索数据.这是要生成包的xml:
<Dataflow Name="DFT Insert into <#=TableName#>">
<Transformations>
<OleDbSource Name="Retreive from Source (<#=TableName#>)" ConnectionName="AS400">
<DirectInput>
SELECT s.*
FROM <#=TableSchema#>.<#=TableName#> s
WHERE s.date > ? AND s.date <= ?
</DirectInput>
<Parameters>
<Parameter Name="0" VariableName="User.StartDate"/>
<Parameter Name="1" VariableName="User.MiddleDate"/>
</Parameters>
</OleDbSource>
<OleDbDestination Name="Insert into Destination (<#=TableName#>)" ConnectionName="DB2Mirror" KeepNulls="true" CheckConstraints="false">
<ExternalTableOutput Table="[<#=TableSchema#>].[<#=TableName#>]" />
</OleDbDestination>
</Transformations>
</Dataflow>
Run Code Online (Sandbox Code Playgroud)
这个结构通常会起作用,因为我已经尝试了它但是使用了ID(int)而不是date(string).我在尝试生成包时收到的错误如下:
Could not execute Query on Connection AS400
OleDbCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.
Run Code Online (Sandbox Code Playgroud)
我知道我可以创建一个ssis变量并将查询中的日期连接为表达式,但我想坚持使用<DirectInput>而不是<VariableInput>
附加信息
日期时间(对不起,我忘了提到它是日期时间,但我认为它没有太大变化)变量中的格式是正确的:yyyy-mm-dd …
我正在尝试使用 Angular 和 Firebase 身份验证构建一个应用程序。
auth.service.ts
async loginWithEmailAndPassword(email: string, password: string) {
try {
await this.auth.signInWithEmailAndPassword(email, password);
} catch(error) {
throw error;
}
}
Run Code Online (Sandbox Code Playgroud)
登录页面.组件
async loginWithEmailAndPassword() {
if (this.form.status !== 'INVALID') {
try {
await this.authService.loginWithEmailAndPassword(this.email?.value, this.password?.value)
} catch(error) {
console.log('Hello, this is my custom error');
}
}
}
Run Code Online (Sandbox Code Playgroud)
这是预期的行为吗?我认为尝试...捕捉可以防止这种情况发生。
我什至尝试删除 async wait 语法,但没有任何改变。
我不知道该怎么做.我使用jQuery draggable,我需要捕获网格位置:
$("#draggable .item").draggable({
containment: "#dragablle",
snap: '.gridlines',
stop: function(event, ui) {
console.log(ui)
}
});
Run Code Online (Sandbox Code Playgroud)
从停止事件看对象接收器:
Object { top=178, left=950}
Run Code Online (Sandbox Code Playgroud)
我需要将top和left值转换为百分比,因此我可以将.item元素应用为内联样式.父"#draggable"宽度和高度将是动态的,这就是我需要百分比而不是像素的原因.因此,当调整屏幕大小时,所有内容将保持在父元素内相同(位置)