数据库连接出错
各位大哥大姐,帮忙检查一下:<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.SqlClient"%>
<script language="c#" runat="server">
void Page_Load()
{
Dim objConnection1 As SqlConnection ;
objConnection1=new SqlConnection("server=local;uid=;pwd=;database=web");
sqlcommand objcommand1=new sqlcommand("select * from name",objconnection);
objconnection.open();
dgrdmain.datasoure==objcommand1.executereader();
dgrdmain.databind();
objconnection.close();
}
</script>
<html>
<head>
<title>
sql
</title>
</head>
<body>
<asp:datagrid
di="dgrdmain"
cellpadding="1"
showheader="true"
borderwidth="0"
runat="server"
/>
</body>
</html>
显示的错误是:e:\web\sql.aspx(6,22): error CS1002: 应输入 ;