关于ASP编程问题?

来源:百度知道 编辑:UC知道 时间:2024/05/12 09:28:49
代码是获取表中内容,修改的页面,提示:
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突(第10行)
<!--#include file="adovbs.inc"-->
<%
t_id=request("editid")
set conn=server.createobject("adodb.connection")
strprovider="provider=sqloledb;data source=414jsj38;initial catalog=library;user id=sa;password=;"
conn.open strprovider
set rs=server.createobject("adodb.recordset")
rs.open "select * from st_info where t_id='&t_id'",conn,adopenkeyset,adlockoptimistic
name=rs("t_name")
id=rs("t_id")
t_class=rs("t_class")
sex=rs("t_sex")
minzu=rs("t_minzu")
phone=rs("t_phone")
address=rs("t_address")
%>
<html>
<body onLoad="page_onload();">
<h2 align=center>sAEDfvsav</h2>
<hr>
<form method=post name=add action="d_edit.asp">
&

"select * from st_info where t_id='&t_id'"
-------------------------------------------
case t_id

数字型的
"select * from st_info where t_id="&t_id&"

字符型的
"select * from st_info where t_id='"&t_id&"'"

注意可能这句的类型不匹配:t_id='&t_id'

检查editid和数据库t_id的类型是否匹配

rs.open "select * from st_info where t_id="&t_id,conn,adopenkeyset,adlockoptimistic