再支持“Let”和“Set”赋值语句(2)时间:2010-04-14 07:49来源:未知 作者:宏兴 点击:435次 二、把上面的代码复制到.NET中(假设文件名为conn.aspx) %@ Page Language=vb AutoEventWireup=false Codebehind=Conn.aspx.vb Inherits=wuliu.Conn% % dim conn dim sql as string set conn=s 二、把上面的代码复制到.NET中(假设文件名为conn.aspx) <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Conn.aspx.vb" Inherits="wuliu.Conn"%> <% dim conn dim sql as string set conn=server.createobject("adodb.connection") sql="driver={sql server};server=(local);uid=sa;pwd=;database=school" conn.open(sql) %> 编译出现的错误如下: 1:BC30807: 不再支持“Let”和“Set”赋值语句 2:无法创建组件“adodb.connection”仅可在带有 <%@ Page aspcompat=true %> 页指令的页上创建单元线程组件 -------------------------------------------------------------------------------- 三、解决办法(添加下面红色的字并且去掉set) <%@ Page Language="vb" aspcompat=true AutoEventWireup="false" Codebehind="Conn.aspx.vb" Inherits="wuliu.Conn"%> <% dim conn dim sql as string conn=server.createobject("adodb.connection") sql="driver={sql server};server=(local);uid=sa;pwd=;database=school" conn.open(sql) %> 本篇文章来源于www. 原文链接:http://www./htgardenml/wangzhanjianshe/2010/0414/6368_2.html
|
|