各位大哥大姐,帮小弟看看下面这个错误吧,小弟十分感谢,很急呀,搞了一天拉,不知道怎么回事,我是个新手,请多指教,谢谢!
Compiler Error Message: BC30188: Declaration expected.Source Error: Line 7:  dim oConn as SQLConnection
Line 8:  dim oComm as SQLCommand
Line 9:  strConn="server=localhost;uid=wanggang;pwd=12678;database=book"   (这一行有错)
Line 10: strComm="insert into Admin(adminname,adminpass)Values('xiaohua','1234567')"
Line 11: oConn=new SQLConnection(strConn)
 所有的程序如下:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Import Namespace="System.Data" %>
<%@ Import NameSpace="System.Data.SQLClient" %>
<script language="vb" runat="server">
dim strConn as string
dim strComm as string
dim oConn as SQLConnection
dim oComm as SQLCommand
strConn="server=localhost;uid=wanggang;pwd=12678;database=book" 
strComm="insert into Admin(adminname,adminpass)Values('xiaohua','1234567')"
oConn=new SQLConnection(strConn)
oComm=new SQLCommand(strComm,oConn)
Try
oConn.open()
Message.InnerHtml="连接数据库成功!"
oComm.ExecuteNonQuery()
Catch myException as Exception
Message.InnerHtml="靠,出错拉!"
Finally
oConn.close()
end Try</script>