This code works just fine for me to select * from x,y,z. However what I want to do is retrieve the values return and assign them to variables. How do I go about this? Thanks in advance.
Using MyConnection As New SqlConnection("Data Source=sql2008.aspnethosting.co.uk;Initial Catalog=xxx_xxxx;Persist Security Info=True;User ID=xxx_xxx;Password=xxxxx")
Dim MyCommand As New SqlCommand("SELECT txfrequency,mode,details FROM frequencies WHERE county = @location", MyConnection)
MyCommand.Parameters.Add("@location", SqlDbType.NVarChar).Value = e.PostBackValue
Dim r As SqlDataReader = MyCommand.ExecuteReader()
GridView1.DataSource = r
'SELECT COUNT(*) FROM TableName WHERE SomeWhereClause
View Complete Post