龙之家园  
我的博客我做主!
在添加文章评论时,是报Connection未能初始化的错误,但数据能正常加入后台数据库!原来是我在Sqlcommand中少加入了:
在ArticleDAO的FeedBack()方法中,
SqlCommand cmd=new SqlCommand(sql,con)------这里竟然漏写了con
不过通在网上的搜寻答案,知道了一切本来不知道的方法,这也算学习进步了:
private static string SQLstring = System.Configuration.ConfigurationManager.AppSettings["connectionString"];---可设为static类型
 
posted on 2006-09-03 20:45  zhengfeng  阅读(200)  评论(0)    收藏  举报