Currently i am selecting everything from my database and sticking it in a datatable and searching through it later on.
The issue is my dataable is so large that when i come to search through it multiple times my page times out!
I have had a think about this and i only actully need to pull from my database teams that are playing that day so i though about doing this:
This code loops though a datatable containing todays football matches and pulls the teams playing (not set a dim ? as yet as im not sure how i would do this)
For Each getteams As DataRowView In DvTheData2
Them i run the script to pull everything from the database (Footballclass.getdatatabl
eis just to pull the data)
Dim dtRecords As DataTable = footballclass.GetDataTable("SELECT * FROM soccerstatsgoals")
So what i would like to do is use the first code to pull all the teams (home and away) then run it though a query like so:
SELECT * FROM soccerstatsgoals Where Home = 'hometeamname1' or Away = 'hometeamname1' or Home = 'awayteamname1' or away = 'awayteamname1' or Home = 'hometeamname2' or Away = 'hometeamname2' or Home = 'awayteamname2' or away = 'awayteamname2' .......
There could be 50 odds teams playing that day ...
what would be the best way to go about this~?