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