Subject Query returns field names with no values
Author howlnh@hotmail.com
Can someone look at this code and tell me why the query returns ok,
gets the field names but there appears to be no values being listed.
The database being used is one of the example ones that comes with
Firebird.

Thanx,

Ryan

code follows:
(Name and password left out)

<%
'###### Creating a date object for manipulation later #######
dateToday = Date()
Set objMail = Server.CreateObject("CDONTS.Newmail")

'###############################################
'##### DB Stuff ##############
'###############################################

'*** Dim variables ***
Dim objConn, objRec
Dim sql, debug

'*** initialize variables ***
debug = 1
set objConn = Server.CreateObject ("ADODB.Connection")
strDSN = "DRIVER={XTG Systems InterBase6 ODBC d
river};DB=amorak:c:\Program Files\Firebird\example
s\v5\EMPLOYEE.gdb;UID=******;PWD=*******;"
objConn.Open strDSN
set objRec = Server.CreateObject ("ADODB.Recordset")

'*** Build sql statement to query the DB ***
sql = "SELECT * from EMPLOYEE"

'################# End DB Stuff ################
%>

<center>
<b><font size="6">Custom Query Results</font></b>
</center>
<hr>
Displayed below is the query you hardcoded:<br>
<%= sql %><br>
<br>
<br>
<%
'*** Get results from DB ***
Set objRec=objConn.Execute(sql)
%>
<%
'objRec.MoveFirst
%>
<center>
<table border="1" cols="<%= objRec.Fields.Count %>" >
<tr>
<%
For Each ColumnName in objRec.Fields %>
<th bgcolor="red"><%= ColumnName.Name %></th>
<%
Next
%>
</tr>
<%
Do While Not objRec.EOF
%>
<tr>
<%
For Each ColVal in objRec.Fields %>
<td bgcolor="white">
<%
'If IsNull(ColVal) Then
'Response.Write " "
'Else
Response.Write ColVal.Value
'End If

%>
</td>
<%
Next
objRec.MoveNext
%>
</tr>
<%
Loop
%>
</table>

<%
objRec.Close
objConn.Close


Set objRec = nothing
Set objConn = nothing
%>
</center>
</body>
</html>