indexaspx
<%@ Page Language=C# %>
<%@ import Namespace=SystemData %>
<%@ import Namespace=SystemDataOleDb %>
<script runat=server>
// Insert page code here
//
void Page_Load(){
string db=@database/datamdb;
string connStr=PROVIDER=MicrosoftJetOLEDB;DATA Source=+ServerMapPath(db)+;;
string SQLcmd=create table IEB_webs(ID identity primary keytitle varchar() Default Null);
OleDbConnection conn=new OleDbConnection(connStr);
connOpen();
OleDbCommand OleCmd=new OleDbCommand(SQLcmdconn);
OleCmdExecuteNonQuery();//执行SQL命令
ResponseWrite(数据表建立完成!);
}
connClose();
conn=null;
OleCmd=null;
}
</script>
<html>
<head>
</head>
<body>
<form method=post runat=server>
<! Insert content here >
</form>
</body>
</html>