%@ LANGUAGE="VBSCRIPT" %>
<%
dim strConn, DBConn, Rs
Sub OpenConn()
strConn = "Provider=MSDASQL;Driver={SQL Server};Server=whsql-v02.prod.mesa1.secureserver.net;Database=DB_68795;UID=tycoon;PWD=percussi0n;"
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open strConn
if Err <> 0 then
ErrMsg = "Database error opening connection " & Err.description
end if
End Sub
Sub CloseConn()
DBConn.Close
Set DBConn = Nothing
End Sub
Sub SetRs()
set Rs = Server.CreateObject("ADODB.Recordset")
if Err <> 0 then
ErrMsg = "Database error opening cursor " & Err.description
end if
End Sub
Sub SetRsSQL(sql)
set Rs = DBConn.Execute(sql)
if Err <> 0 then
ErrMsg = "Database error opening cursor for " & sql & " " & Err.description
end if
End Sub
function iif(psdStr, trueStr, falseStr)
if psdStr then
iif = trueStr
else
iif = falseStr
end if
end function
%>
Tycoon Percussion - Audio Clips
<%
Dim ErrMsg, CatName, PrevCatName, CurrCatName, CatAudioSQL, CatAudioOrder, AudioFound, CatId, arrAudio
ErrMsg = ""
CatName = ""
PrevCatName = ""
CurrCatName = ""
On Error Resume Next
OpenConn()
if ErrMsg <> "" then response.Write(ErrMsg)
if request.QueryString("cat") <> "" then CatName = request.QueryString("cat")
CatAudioSQL = _
"select a.audio_id, a.audio_name, a.audio_type, a.description, c.category_name " & _
"from audio a, category_audio ca, category c " & _
"where a.audio_id = ca.audio_id and c.category_id = ca.category_id"
CatAudioOrder = " order by c.category_name, ca.display_order "
if CatName = "" then
CatAudioSQL = CatAudioSQL & CatAudioOrder
else
CatAudioSQL = CatAudioSQL & " and c.category_name = '" & CatName & "' " & CatAudioOrder
end if
'response.Write("
CatAudioSQL = " & CatAudioSQL & "
")
'response.End()
SetRsSQL(CatAudioSQL)
AudioFound = false
If (Err = 0) and (ErrMsg = "") Then
if not (Rs.BOF and Rs.EOF) then
AudioFound = true
arrAudio = Rs.GetRows()
end if
Set Rs = Nothing
end if
%>
<%if AudioFound then%>
Audio Clips
The MP3 sound clips below provide an example of the superb sound quality of all our percussion instruments. Your browser must support QuickTime to play the audio files. You may need to click the controller to activate it.
<%For iRowLoop = 0 to UBound(arrAudio, 2)
CurrCatName = arrAudio(4, iRowLoop)
if (PrevCatName = "") or ((PrevCatName <> "") and (PrevCatName <> CurrCatName)) then
response.Write("