<% @language=VBScript %> <% Response.Buffer = True %> <% Dim SokVarde Dim Sida Dim SidAntal Dim bok SokVarde = Request.QueryString("q") bok = Request.QueryString("bok") if SokVarde = ""then bapp = 1 end if Sida = Request.QueryString("Sida") %> Historiska världar - sök i Medeltidens ABC och Vikingatidens ABC

Historiska Världar

vikingatid

 

medeltid

<% If SokVarde <> "" then Dim objConn Dim objRec Dim Sql Set objConn = Server.CreateObject("ADODB.Connection") Set objRec1 = Server.CreateObject("ADODB.Recordset") Set objRec2 = Server.CreateObject("ADODB.Recordset") 'objConn.Open "DSN=WEB;UID=WEB;PWD=WEB" 'ändrat 2007-09-22 av Ulf Bodin eftersom ODBC-kopplingar förefaller ha blockerats av SMM eller aldrig satts upp av KnowIT objConn.Open "Provider=SQLOLEDB.1;Password=web;Persist Security Info=True;User ID=web;Data Source=draken;Initial Catalog=historiska_varldar;Network Library=DBMSSOCN;" 'objRec1.ActiveConnection = objConn Sql = "select rubrik, artid from art where UPPER(rubrik) like '" & UCase(SokVarde) & "%' AND BOK = 0 ORDER BY rubrik ASC" objRec1.Open Sql, objConn, adOpenStatic Sql = "select rubrik, artid from art where UPPER(rubrik) like '" & UCase(SokVarde) & "%' AND BOK = 1 ORDER BY rubrik ASC" objRec2.Open Sql, objConn, adOpenStatic if objRec1.EOF And objRec2.EOF then Response.Write "Det finns inget uppslagsord i databasen som börjar p " & SokVarde & "

" else If Sida = "" then Sida = 0 Else i = 0 While i < Cint(Sida) AND not objRec1.EOF objRec1.MoveNext i = i + 1 Wend i = 0 While i < Cint(Sida) AND not objRec2.EOF objRec2.MoveNext i = i + 1 Wend End if Response.Write "" Response.Write "" Response.Write "" Response.Write "" i = 0 c = 0 While i < 15 if not objRec1.EOF then if c = 0 then Response.Write "" else Response.Write "" end if objRec1.MoveNext else Response.Write "" end if Response.Write "" if not objRec2.EOF then if c = 0 then Response.Write "" c = 1 else Response.Write "" c = 0 end if objRec2.MoveNext else Response.Write "" end if i = i + 1 if objRec1.EOF AND objRec2.EOF then i = 15 end if Wend 'Response.Write "

Rubrik   Rubrik
" & objRec1("rubrik") & "
" & objRec1("rubrik") & "
  " & objRec2("rubrik") & "
" & objRec2("rubrik") & "
 
" 'Response.Write "
" %>
<% If Sida > 0 then %> <<< Föreg sida   <% Else %>   <% End If %>   <% If not objRec1.EOF OR not objRec2.EOF then Response.Write "Nästa sida >>>" Else Response.Write " " End If %>
<% End If 'objRec1.Close objConn.Close 'Set objRec1 = Nothing Set objConn = Nothing End if %>