再支持“Let”和“Set”賦值語句(2)時間:2010-04-14 07:49來源:未知 作者:宏興 點(diǎn)擊:435次
二、把上面的代碼復(fù)制到.NET中(假設(shè)文件名為conn.aspx) %@ Page Language=vb AutoEventWireup=false Codebehind=Conn.aspx.vb Inherits=wuliu.Conn% % dim conn dim sql as string set conn=s
二、把上面的代碼復(fù)制到.NET中(假設(shè)文件名為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)
%>
編譯出現(xiàn)的錯誤如下:
1:BC30807: 不再支持“Let”和“Set”賦值語句
2:無法創(chuàng)建組件“adodb.connection”僅可在帶有 <%@ Page aspcompat=true %> 頁指令的頁上創(chuàng)建單元線程組件
--------------------------------------------------------------------------------
三、解決辦法(添加下面紅色的字并且去掉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.panpan.org 原文鏈接:http://www.panpan.org/htgardenml/wangzhanjianshe/2010/0414/6368_2.html
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報。