hvad har jeg glemt eller gjort forkert i denne opsætning
Har et side der henter et link fra en db så opretter den en liste ud fra linket og gå så videre til næste link i min db men den kommer med en fejl:....link....
http://www.billundfodbold.dk/bif/team&results/get_main_results_to_db2.asp
....fejl....
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'instr'
/bif/team&results/get_main_results_to_db2.asp, line 50
....linje er....
Read = instr(Read,strResult,"</table")
....Side code....
Call OpenDB
strSQL = "SELECT [T_ID], [Te_Li2] FROM List"
strSQL = strSQL & " WHERE [Te_Li2] NOT LIKE '%program%'"
strSQL = strSQL & " AND [Te_Li2] NOT LIKE '%position%'"
strSQL = strSQL & " ORDER BY [T_ID] ASC;"
Set objRS = objConn.Execute(strSQL)
Do While Not objRS.EOF
strLi = objRS("Te_Li2")
Set re = New RegExp
re.Global = True
re.Pattern = "teamid=(\d+)&poolid=(\d+)"
Set matches = re.Execute(strLi)
For Each m In matches
strtid = m.SubMatches(0)
strpid = m.SubMatches(1)
Next
Dim strResult
strUr1 = "http://www.dbu.dk/sr/programTeam.aspx?teamid="
strUr2 = "&poolid="
strUr3 = "&year2005"
strUr = strUr1&strtid&strUr2&strpid&strUr3
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HttpObj.Url = trim(" "&strUr&" ")
HttpObj.FollowRedirects = True
HttpObj.RequestMethod = "GET"
HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"
strResult = HttpObj.GetURL
Dim Read, ReadEnd, Matchnumber, MatchdateTeam, Hometeam, Awayteam, Playground, Score
Read = instr(1,strResult,"PROGRAM START")
Read = instr(Read,strResult,"</table")
while Read > 0
Matchnumber = " "
Matchdate = " "
Hometeam = " "
Awayteam = " "
Playground = " "
Score " "
Read = instr(Read,strResult,"linkul") + 8
ReadEnd = instr(Read,strResult,"<")
Matchnumber = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">")
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">") + 1
ReadEnd = instr(Read,strResult,"<")
Matchdate = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">")
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">") + 1
ReadEnd = instr(Read,strResult,"<")
Hometeam = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">")
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">") + 1
ReadEnd = instr(Read,strResult,"<")
Awayteam = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<span")
Read = instr(Read,strResult,">") + 1
ReadEnd = instr(Read,strResult,"<")
Playground = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<td")
Read = instr(Read,strResult,">") + 1
ReadEnd = instr(Read,strResult,"<")
Score = mid(strResult,Read,ReadEnd-Read)
Read = instr(Read,strResult,"<table")
wend
Response.Write (Matchnumber&" "&MatchdateTeam&" "&Hometeam&" "&Awayteam&" "&Playground&" "&Score&"<br>")
objRS.MoveNext
Loop
Response.Write ("<br><br><br>")
Set HttpObj = nothing
Call CloseDB
