G
Guest
Hi,
why i get an error as below after running the program.
"There is already an open Data Reader associated with this connection which
must be closed first."
the original code that produce the error as follow:
dim myconnec as sqlconnection = new sqlconnection("Connectionstring")
dim mycomm as sqlcommand = new sqlcommand("select * from person",myconnec)
myconnec.open()
datagrid1.datasource = mycomm.executereader(commandbehavior.closeconnection)
*this line generates the error message.
datagrid1.databind()
myconnection.close()
any ideas ?? how to solve it ?
i believe such error make me cannot rebind my datagrid content on the
frameset.htm after i update some of the data.
thanks in advance.
daniel.
why i get an error as below after running the program.
"There is already an open Data Reader associated with this connection which
must be closed first."
the original code that produce the error as follow:
dim myconnec as sqlconnection = new sqlconnection("Connectionstring")
dim mycomm as sqlcommand = new sqlcommand("select * from person",myconnec)
myconnec.open()
datagrid1.datasource = mycomm.executereader(commandbehavior.closeconnection)
*this line generates the error message.
datagrid1.databind()
myconnection.close()
any ideas ?? how to solve it ?
i believe such error make me cannot rebind my datagrid content on the
frameset.htm after i update some of the data.
thanks in advance.
daniel.