What i want to do is to find posts in the table antivirus where foretagskod has a value and to set the variable "task" to 1 . something is wrong with the loop , seems like it goes into an eternity loop...
dbName="Inventering.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.Mappath(dbName)
Dim SQL, hamta, task
SQL = "SELECT VirusscanID FROM Antivirus WHERE Foretagskod='" & Request.QueryString("id") & " '"
Set hamta=conn.execute(SQL)
while not hamta.EOF
if hamta("VirusscanID")<>"" Then
task = 1
END IF
WEND
dbName="Inventering.mdb"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.Mappath(dbName)
Dim SQL, hamta, task
SQL = "SELECT VirusscanID FROM Antivirus WHERE Foretagskod='" & Request.QueryString("id") & " '"
Set hamta=conn.execute(SQL)
while not hamta.EOF
if hamta("VirusscanID")<>"" Then
task = 1
END IF
WEND