SUB声明求救了。救命呀!!!!!

exten 2001-11-24 01:29:51
SUB声明求救了。

下面SUB声明语句中,
Sub AddRecord语句后面的(lngCatID, blnIsValidation)是干什么用的???

也就是说这里的第一句是否可以省略lngCatID, blnIsValidation部分,直接写成Sub AddRecord()。

Sub AddRecord(lngCatID, blnIsValidation)
Dim dcnDB
Dim rsProd

Set dcnDB = MakeConnection()

If Not blnIsValidation Then
ShowPage rsProd, Action_Add, lngCatID
Else
Set rsProd = CreateRecordset(dcnDB, _
NoRecordSelected, False)
rsProd.AddNew
StoreData rsProd
rsProd.Update
rsProd.Close
dcnDB.Close
Response.Redirect "catviewer.asp"
End If
End Sub
...全文
63 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ttt2 2001-11-24
  • 打赏
  • 举报
回复
他们都是参数,他们正在被 addrecord()函数使用,所以您不能移除他们,直到您定义他们成为全局变量,象这样
exten 2001-11-24
  • 打赏
  • 举报
回复
兄弟,下面英文看不懂啊??
they are parameters, they are being used in AddRecord(..), so you cannot remove them, unless you declare them to be global variables, like this:
karma 2001-11-24
  • 打赏
  • 举报
回复
they are parameters, they are being used in AddRecord(..), so you cannot remove them, unless you declare them to be global variables, like this:

DIM lngCatID, blnIsValidation

Sub AddRecord()
Dim dcnDB
Dim rsProd

Set dcnDB = MakeConnection()

If Not blnIsValidation Then
ShowPage rsProd, Action_Add, lngCatID
Else
Set rsProd = CreateRecordset(dcnDB, _
NoRecordSelected, False)
rsProd.AddNew
StoreData rsProd
rsProd.Update
rsProd.Close
dcnDB.Close
Response.Redirect "catviewer.asp"
End If
End Sub

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧