need to get two database values of two storeprocedure value in one gridview to compare there values.right now i have two gridview to get values from two database storeprocedure value
Sub storep()
Dim strConnString As String = ConfigurationManager.ConnectionStrings("connTemplate").ConnectionString
Dim con As New SqlConnection(strConnString)
Dim cmd As New SqlCommand()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "storeroom"
cmd.Connection = con
Try
con.Open()
GridView1.EmptyDataText = "No Records Found"
GridView1.DataSource = cmd.ExecuteReader()
GridView1.DataBind()
Catch ex As Exception
Throw ex
Finally
con.Close()
con.Dispose()
End Try
End Sub
Sub storep_Backup()
Dim strConnString As String = ConfigurationManager.ConnectionStrings("connBackUp").ConnectionString
Dim con As New SqlConnection(strConnString)
Dim cmd As New SqlCommand()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "storeroom"
cmd.Connection = con
Try
con.Open()
GridView2.EmptyDataText = "No Records Found"
GridView2.DataSource = cmd.ExecuteReader()
GridView2.DataBind()
Catch ex As Exception
Throw ex
Finally
con.Close()
con.Dispose()
End Try
End Sub