Dim SelectCMD As New SqlCommand("SELECT BreakpointStep, BreakpointValue, Rate_BP * .01 AS Rate FROM FEE_SCHEDULE_DEFAULT WHERE (AccountType = 1) AND (BreakpointStep > 0) AND (ScheduleId = '000009');" & _
"SELECT BreakpointStep,BreakpointValue, Rate_BP * .01 AS Rate FROM FEE_SCHEDULE_DEFAULT WHERE (AccountType = 2) AND (BreakpointStep > 0) AND (ScheduleId = '000009')", sqlConn)
sqlConn.Open()
Dim drStatus As SqlDataReader = SelectCMD.ExecuteReader
If drStatus.HasRows Then
With dgEquity
.DataSource = drStatus
.DataBind()
End With
drStatus.NextResult()
With dgFixedIncome
.DataSource = drStatus
.DataBind()
End With
End If
drStatus.Close()
sqlConn.Close()
Catch ex As Exception
Response.Write(ex.Message)
End Try
Can someone please tell me what i am doing wrong here because its telling me that the state of the connection is already open. When i comment out the sqlConn.open, im not getting any records when i know there are atleast 5. Any help will be greatly appreciated.
"SELECT BreakpointStep,BreakpointValue, Rate_BP * .01 AS Rate FROM FEE_SCHEDULE_DEFAULT WHERE (AccountType = 2) AND (BreakpointStep > 0) AND (ScheduleId = '000009')", sqlConn)
sqlConn.Open()
Dim drStatus As SqlDataReader = SelectCMD.ExecuteReader
If drStatus.HasRows Then
With dgEquity
.DataSource = drStatus
.DataBind()
End With
drStatus.NextResult()
With dgFixedIncome
.DataSource = drStatus
.DataBind()
End With
End If
drStatus.Close()
sqlConn.Close()
Catch ex As Exception
Response.Write(ex.Message)
End Try
Can someone please tell me what i am doing wrong here because its telling me that the state of the connection is already open. When i comment out the sqlConn.open, im not getting any records when i know there are atleast 5. Any help will be greatly appreciated.