本文介绍了重新发布:错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个从Access收集信息的程序。我正在尝试使用 以下select命令从Families 表中选择所有信息并将其存储在数据集中,再加入Surname和FirstName字段 创建一个新字段,FamilyName: selFamilies.CommandText =" SELECT Families。*,Families.Surname +'',' '+ Families.FirstName AS FamilyName FROM Families ORDER BY Surname,FirstName" 直到最近,它已经完美地工作了很多次,现在 当我尝试运行该程序时,它停在这一行: adpFamilies.Fill(datSPARK," Families") 并给我这个错误消息: "'System.InvalidOperationException'类型未处理的异常 在系统中.data.dll 附加信息:当读者关闭时,对NextResult的尝试无效。 I''mn对于整个数据库的事情,这条消息对我来说是希腊语。如果我使用这个简单的选择命令代替: selFamilies.CommandText =" SELECT * FROM Families ORDER BY Surname, FirstName 程序没有给我错误。 我真的很感激任何人都可以给我的帮助。 谢谢 Carolyn 解决方案 I''ve got a program that collects info from an Access. I''m trying to use thefollowing select command to select all the information from the "Families"table and store it in a dataset, plus join the Surname and FirstName fieldsto create a new field, FamilyName:selFamilies.CommandText = "SELECT Families.*, Families.Surname + '', '' +Families.FirstName AS FamilyName FROM Families ORDER BY Surname, FirstName"This has been working perfectly a number of times until recently, and nowwhen I try to run the program, it stops on this line:adpFamilies.Fill(datSPARK, "Families")and gives me this error message:"An unhandled exception of type ''System.InvalidOperationException'' occurredin system.data.dllAdditional information: Invalid attempt to NextResult when reader isclosed."I''m new to the whole database thing, and this message is Greek to me. If Iuse this simple select command instead:selFamilies.CommandText = "SELECT * FROM Families ORDER BY Surname,FirstName"the program doesn''t give me the error.I would really appreciate any help anyone can give me.ThanksCarolyn 解决方案 这篇关于重新发布:错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 06-17 11:21