已知數(shù)據(jù)表Student存儲(chǔ)在SQL Server服務(wù)器的School數(shù)據(jù)庫中,用戶名為sa,密碼為xyz123,創(chuàng)建student數(shù)據(jù)表的命令為:
CREATE TABLE Student (
SName varchar(20) Primary Key Not NULL,
SPwd Varchar(15) Not NULL
)
試根據(jù)下面的代碼使用命令對象完成在student數(shù)據(jù)表中插入一條記錄。
<%
tname = Request.Form("txtName") ’接收到的用戶名
tpwd = Request.Form("txtPwd")
’接收到的密碼
%>