[英]The Multi.Dictionary component has expired can it be replaced with Scripting.Dictionary?
I was using the MOTO BIT Mdict as my dictionary component, putting all my translations in the Application object as per the below code, and it worked fine, until the component expired 2 days ago for unknown reasons, 12 years later on.我使用 MOTO BIT Mdict 作为我的字典组件,按照下面的代码将我所有的翻译放在应用程序 object 中,它工作正常,直到组件在 2 天前因未知原因过期,12 年后。
The MOTO Bit website is not replying - so now I seek help if anyone knows how I can reprogram the code below to use with the build in asp scripting.dictionary instead. MOTO Bit 网站没有回复 - 所以现在我寻求帮助,如果有人知道我如何重新编程下面的代码以与 asp scripting.dictionary 中的构建一起使用。 Is it possible at all?
有可能吗?
Function Write(strID, Comment)
If ValidNumber(strID) Then
If (IsObject(Application("Translation_" & StoryCountry)) = False) OR Debugf = True Then
SET objDic = Server.CreateObject("Multi.Dictionary")
'Load the translations into the dic object
set toRs = conn.execute("EXEC dbo.GetTranslationsByCountryID " & StoryCountry)
If Not toRs.Eof Then
tRow = toRs.GetRows()
For tx = 0 To UBound(tRow, 2)
IF objDic.Exists(tRow(0, tx)) THEN
ELSE
strTranslationKey = tRow(0, tx)
strTranslationText = tRow(1, tx)
objDic.Add strTranslationKey, strTranslationText
END IF
Next
SET Application("Translation_" & StoryCountry) = objDic
End If
Set toRs = Nothing
End If
Write = Application("Translation_" & StoryCountry)(strID)
Else
Write = "Invalid"
End If
End Function
Unfortunately, Lord Svendson, using Scripting.Dictionary objects at the Application level is not allowed.不幸的是,Svendson 勋爵不允许在应用程序级别使用 Scripting.Dictionary 对象。 When you attempt to
SET Application("Translation_" & StoryCountry) = objDic
, it errors for this reason.当您尝试
SET Application("Translation_" & StoryCountry) = objDic
时,它会因此出错。 You will need to find a workaround to using Scripting.Dictionary您将需要找到使用 Scripting.Dictionary 的解决方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.