Akvile Lawrence's Wildlife Paintings website Site Map
<%
'declare the variables
Dim Connection
Dim oRS
Dim SQL, numWorks, i, desc(100), price(100), ThumbnailUrl(100), LargeUrL(100), wrkType(100), id(100), title(100), worktype
Dim medium(100), canvas(100), width(100), height(100), StoryBehind(100)
'declare the SQL statement that will query the database
worktype = "Wildlife"
SQL = "SELECT * FROM PaintingDataBase where Type='" & worktype & "' and (isActive='yes' or PrintsActive='yes') ORDER BY Ord"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
'open the connection to the database
'connectstr = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=akvilytes.db.7183007.hostedresource.com; PORT=3306; DATABASE=akvilytes; USER=akvilytes; PASSWORD='Kismet02!'; OPTION=0;"
connectstr = "DRIVER={MySQL ODBC 5.1 Driver}; SERVER=localhost; DATABASE=148138-svartingeinfo; USER=148138_jy12987; PASSWORD='kismet02'; OPTION=3;"
Connection.Open connectstr
'Open the recordset object executing the SQL statement and return records
Set oRS=Connection.Execute(SQL)
numWorks = 0
if not oRS.EOF then
while not oRS.EOF
numWorks = numWorks + 1
title(numWorks) = oRs.Fields("Title")
desc(numWorks) = oRs.Fields("Description")
price(numWorks) = oRs.Fields("Price")
ThumbnailUrl(numWorks) = oRs.Fields("ThumbnailName")
LargeUrl(numWorks) = oRs.Fields("LargeImageName")
wrkType(numWorks) = oRs.Fields("Type")
id(numWorks) = oRs.Fields("idPaintingDataBase")
medium(numWorks) = oRs.Fields("Medium")
canvas(numWorks) = oRs.Fields("Canvas")
width(numWorks) = oRs.Fields("Width")
height(numWorks) = oRs.Fields("Height")
StoryBehind(numWorks) = ""
StoryBehind(numWorks) = oRs.Fields("StoryBehind")
%>
<%if StoryBehind(numWorks) <> "" Then%> <%End if%>
<%
oRS.movenext
wend
oRS.close
end if
'close the connection and recordset objects freeing up resources
Set oRs = nothing
Set Connection=nothing
%>
|