大家好, ASP支持关键字''as''?我有理由确定它是有效的 VBScript(我下载的代码示例使用它)但是当我尝试在 ASP中使用它时我得到了一个错误。它可能是版本问题吗? 预期声明结束 Dim conn As New ADODB.Connection ---- ----- ^ - 肖恩。
Hi all, Is the keyword ''as'' supported in ASP? I''m reasonably sure it''s valid VBScript (code examples I''ve downloaded use it) but when I try to use it in ASP I get an error. Is it perhaps a version issue? Expected end of statement Dim conn As New ADODB.Connection ---------^ -- Sean.
推荐答案Sean写道: Sean wrote: 大家好, ASP中是否支持关键字''as''?我有理由相信它是有效的 VBScript(我下载的代码示例使用它)但是当我尝试在ASP中使用它时,我得到一个错误。它可能是版本问题吗? 预期声明结束 Dim conn As New ADODB.Connection --------- ^ Hi all, Is the keyword ''as'' supported in ASP? I''m reasonably sure it''s valid VBScript (code examples I''ve downloaded use it) but when I try to use it in ASP I get an error. Is it perhaps a version issue? Expected end of statement Dim conn As New ADODB.Connection ---------^
不。这是'VB。 VBscript如下: Dim conn SET conn = CreateObject( ADODB.Connection) - Mike Brind
Nope. That''s VB. VBscript is as follows: Dim conn SET conn = CreateObject("ADODB.Connection") -- Mike Brind
Sean S - Perth,WA写道: Sean S - Perth, WA wrote: 大家好, ASP中是否支持关键字''as''?我有理由相信它是有效的 VBScript(我下载的代码示例使用它) 那些必须是VB的例子,而不是vbscript ... 但是当我尝试在ASP中使用它时我得到一个错误。它可能是版本问题吗? ASP不是一种语言:它是一个支持使用几种 脚本语言的平台,包括vbscript,jscript和perlscript。 预期声明结束 Dim conn As New ADODB.Connection --------- ^ Hi all, Is the keyword ''as'' supported in ASP? I''m reasonably sure it''s valid VBScript (code examples I''ve downloaded use it) Those must be VB examples, not vbscript ... but when I try to use it in ASP I get an error. Is it perhaps a version issue? ASP is not a language: it is a platform that supports the use of several scripting languages, including vbscript, jscript and perlscript. Expected end of statement Dim conn As New ADODB.Connection ---------^
在vbscript中,只允许变体,所以不,AS [新]数据类型是不允许。 在 文档中查看有关VB和VBScript之间差异的两个主题,您可以从中下载: tinyurl/7rk6 - Microsoft MVP - ASP / ASP.NET 请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我 不经常检查它。如果您必须离线回复,请删除 NO SPAM
In vbscript, only variants are allowed, so no, the "AS [New] datatype" is not allowed. See the two topics about the differences between VB and VBScript in the documentation you can download from: tinyurl/7rk6 -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don''t check it very often. If you must reply off-line, then remove the "NO SPAM"
> VBscript如下: > VBscript is as follows: Dim conn SET conn = CreateObject(" ADODB.Connection") Dim conn SET conn = CreateObject("ADODB.Connection")
但在ASP中使用Server.CreateObject而不是CreateObject。
But in ASP use Server.CreateObject instead of CreateObject.
更多推荐
'AS'关键字是否受支持?
发布评论