<%
set cnn = Server.CreateObject(“ADODB.Connection“)
ps=“Driver={Microsoft Access Driver (*.mdb)};DBQ=“_
& Server.MapPath(“..\DBASE\DBASE.MDB“)
cnn.open ps
%>
<%
xm=request.form(“xm“)
zgid=request.form(“zgid“)
sql=“select * from person“
Set rst=Server.CreateObject(“ADODB.Recordset“)
rst.open sql,cnn,2,2
if rst.eof then
sql=“Insert into person values (’“&zgid&“’,’“&xm&“’)“
set rst1=server.createobject(“ADODB.Recordset“)
rst1.open sql,cnn,2,2
end if
%>
ODBC连接是对的,但执行后却提示“[Microsoft][ODBC Microsoft Access 驱动程序] 字段 ’person.zgid’ 不能是零长度的字符串。”
这是怎么回事啊,实在不懂,还望各位高手帮忙!!zgid,xm都是文本