still working on this DB :o(
I have..
a query that I run, if this query is unsuccessful then another query is run
on another table, it goes something like this
if rs1.EOF then '1st query returns nothing
response.write "nothing in this table"
'so check the other table
strSQL = "SELECT * blah blah
rs.Open strSQL, Conn, 1
if rs.EOF then '2nd query also returns nothing
response.write "nothing in this table either"
else
do while not rs.EOF
reg = rs("reg_num")
l_read = rs("last_read" )
response.write blah blah
end if
else
do while not rs1.EOF
strname = rs1("user_name" )
response.write blah blah
rs1.movenext
loop
end if
but I get an expected statement (end if) error
I'm looking at my code it it seems to conform to the correct structure
if condition1 then
code block1
if condition2 then
codeblock2
else
codeblock3
end if
else
codeblock4
end if
should I perhaps have used elseif??
I have..
a query that I run, if this query is unsuccessful then another query is run
on another table, it goes something like this
if rs1.EOF then '1st query returns nothing
response.write "nothing in this table"
'so check the other table
strSQL = "SELECT * blah blah
rs.Open strSQL, Conn, 1
if rs.EOF then '2nd query also returns nothing
response.write "nothing in this table either"
else
do while not rs.EOF
reg = rs("reg_num")
l_read = rs("last_read" )
response.write blah blah
end if
else
do while not rs1.EOF
strname = rs1("user_name" )
response.write blah blah
rs1.movenext
loop
end if
but I get an expected statement (end if) error
I'm looking at my code it it seems to conform to the correct structure
if condition1 then
code block1
if condition2 then
codeblock2
else
codeblock3
end if
else
codeblock4
end if
should I perhaps have used elseif??
Comment