Hi All,
I wish to populate more than one datagrid from the same OleDBCommand. The
code I have is:
Dim objCmd As New OleDbCommand(st rSql, objConn)
Then...
Me.dgTariffHoli dayHomesBand1.D ataSource = objCmd.ExecuteR eader()
Me.dgTariffHoli dayHomesBand1.V isible = True
Me.dgTariffHoli dayHomesBand2.D ataSource = objCmd.ExecuteR eader()
Me.dgTariffHoli dayHomesBand2.V isible = True
I get this error when the second call to objCmd.ExecuteR eader() is called:
System.InvalidO perationExcepti on: ExecuteReader requires an open and
available Connection.
The reason for populating multiple grids from the same data, is that I am
calling ALL columns in the SQL, and then using (for example) columns A and
B
in DG1, C and D in DG2...and so on.
Surely I don't need a new recordset for each datagrid???
Simon.