r> 现在,可以双击Global.asa,查看以上步骤在这个文件里生成的代码。代码定义了连接SQL Server数据库所必需的一些变量。 为了初始化类 clsImageLoader ,必须在Global.asp的开始放两行代码。我们在列表 C里列出了Global.asa里的代码。注意clsImageLoader 是一个会话范围内的对象。 列表 C: Global.asa <OBJECT RUNAT=Server SCOPE=Session ID=objImageLoader PROGID="ImageLoader.clsImageLoader"> </OBJECT> <SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Session_OnStart Session("Grocevb_ConnectionString") = "DRIVER=SQL Server; SERVER=(local); UID=sa;PWD=;APP=Microsoft (R) Developer Studio;WSID=JIA; DATABASE=Grocevb;UseProcForPrepare=0" Session("Grocevb_ConnectionTimeout") = 15 Session("Grocevb_CommandTimeout") = 30 Session("Grocevb_RuntimeUserName") = "sa" Session("Grocevb_RuntimePasswor页码:[1] [2] [3] [4] [5] [6] [7] 第2页、共7页 |