I've got a little question about retrieving content from a database.
I have a table which has 4 columns: ID, NLText, FRText and ENText.
The basic idea is that the user can choose the language that he preferres and I just fill in the text in the chosen language upon loading the page.
In my code I tell him to select the appropriate columnname to be retrieved in the recordset.
When I try to fill in the content in the page I actually want to use the indexes value of the recordset. And that's where it goes wrong.
To make it all a bit more clear, here's a snippet of the code:
Expand|Select|Wrap|Line Numbers
- langSQL = "SELECT ENText FROM Language"
- Set lang = DBConnection.Execute(langSQL)
- ...
- <% =lang.fields.item(2) %>
I was hoping to be able to read the text directly out of the recordset but I'm not sure if this is possible although I couldn't imagine it not being possible.
Who can point me in the right direction?
*** Edit ***
It just hit me that the fields aren't going to work obviously since these are the fields of the records.
What I would need is a way to select the different records of the recordset.
One way of doing this would be to loop through the Recordset and put all values into an array and then read from the array but I'm hoping that there will be an easier way of doing this.
Thanks,
Kenneth