I create a record set as follows:
The recordset rs should contain the following.
[ul]
[li]rs("id"[/li]
[li]rs("text"[/li]
[/ul]
I now want to display the contents of my recordset.
There is no problem if I want to display as follows:
But if I try to do it in a different order:
The second paragraph will be blank!
Obviously this is not a big deal when dealing with a recordset containing only a few fields, but as soon as I start doing more complex selects (ie use * to get all fields, use calculated fields, specify a lot of fields) things become problematic.
Can anyone tell me if I am doing something wrong, or if there is a simple workaround to this problem.
Cheers --
Dunx
Code:
rs = Server.CreateObject("ADODB.Recordset");
sql = "SELECT id,text WHERE id = 1";
rs.Open(sql,my_connection);
[ul]
[li]rs("id"[/li]
[li]rs("text"[/li]
[/ul]
I now want to display the contents of my recordset.
There is no problem if I want to display as follows:
Code:
<p><%=rs("id")%></p>
<p><%=rs("text")%></p>
Code:
<p><%=rs("text")%></p>
<p><%=rs("id")%></p>
Obviously this is not a big deal when dealing with a recordset containing only a few fields, but as soon as I start doing more complex selects (ie use * to get all fields, use calculated fields, specify a lot of fields) things become problematic.
Can anyone tell me if I am doing something wrong, or if there is a simple workaround to this problem.
Cheers --
Dunx