各位高手,我抄了一段程序,想要显示上传地原图片大小,可是总是显示下列信息.请问错误出在哪里啊 错误类型: Microsoft OLE DB Provider for ODBC Drivers (0x80040E2F) [Microsoft][ODBC SQL Server Driver][SQL Server]无法将 NULL 值插入列 'id',表 'xmgl.dbo.images';该列不允许空值。INSERT 失败。 /upload/process.asp, 第 37 行 下面是我的源程序 process.asp <%
response.buffer=true
formsize=request.totalbytes
formdata=request.binaryread(formsize)
bncrlf=chrB(13) & chrB(10)
divider=leftB(formdata,clng(instrb(formdata,bncrlf))-1)
datastart=instrb(formdata,bncrlf & bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
mydata=midb(formdata,datastart,dataend)
set connGraph=server.CreateObject("ADODB.connection")
connGraph.ConnectionString="driver={SQL Server};server=BYN;database=xmgl;UID=sa;PWD="
connGraph.Open
set rec=server.createobject("ADODB.recordset")
rec.Open "SELECT * FROM [images] where id is null",connGraph,1,3
rec.addnew
rec("img").appendchunk mydata
rec.update
rec.close 在线等待.请指教!!