C
Carolyn
I've got a program that collects info from an Access. I'm trying to use the
following select command to select all the information from the "Families"
table and store it in a dataset, plus join the Surname and FirstName fields
to 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 now
when 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' occurred
in system.data.dll
Additional information: Invalid attempt to NextResult when reader is
closed."
I'm new to the whole database thing, and this message is Greek to me. If I
use 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.
Thanks
Carolyn
following select command to select all the information from the "Families"
table and store it in a dataset, plus join the Surname and FirstName fields
to 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 now
when 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' occurred
in system.data.dll
Additional information: Invalid attempt to NextResult when reader is
closed."
I'm new to the whole database thing, and this message is Greek to me. If I
use 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.
Thanks
Carolyn