抛出异常System.NullReferenceException怎么办?
异常详细信息: System.NullReferenceException代码如下:dim filename,filepath as string
filename=Path.GetFileName(uploadfile.Postedfile.FileName)
filepath= server.mappath("picture") & "\" & filename
uploadfile.postedfile.saveas(filepath)
'message.text=filepath
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("piao.mdb"))
dim cmd as new oledbcommand("insert into movie(m_name,m_jj,m_people,m_dy,m_price,m_time,m_long,m_count,m_picture)values('"& m_name.text &"','"& m_jianjie.text &"','"& m_people.text &"','"& m_dy.text &"'," & csng(m_price.text()) &",#" & cdate(m_time.text) & "#," & csng(m_long.text) & "," & cint(m_count.text) & ",'" & filename & "')",conn)
conn.open()
cmd.executenonquery()
conn.close()
message.text="已经成功添加!"