标题:抛出异常System.NullReferenceException怎么办?
只看楼主
qlx_123
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-11-2
 问题点数:0 回复次数:2 
抛出异常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="已经成功添加!"
搜索更多相关主题的帖子: System 
2007-12-25 17:36
qlx_123
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-11-2
得分:0 
有哪位高手可以帮忙,谢谢了

2007-12-25 17:37
qlx_123
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-11-2
得分:0 
谢谢各位!

2007-12-25 18:41



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-194244-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.251334 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved