ODBC Connection to informix from the web

I am trying to create a combobox or dialog box on the web that will contain a list of all the names retrieved from an informix database. I am running an gent from the Web QueryOpen event of the form. But the code does not work. Please Help !!!

The ODBC DB has been declared in the SYSTEM DSN section.

Also i am giving the following code in the Agent’s Options

Option Public

Uselsx “*LSXODBC”

Sub Initialize

Dim con As New ODBCConnection 

Dim qry As New ODBCQuery 

Dim res As New ODBCResultSet 

Dim doc As NotesDocument

Dim item As notesitem

Set doc = session.DocumentContext

Set db = session.CurrentDatabase



If con.ConnectTo( "CARRIER","carrier","telecom2") Then

	Set Qry.Connection = Con 

	

	Qry.SQL = "Select client_name from informix.client where  client_number = 526265 order by 1" 

	Set res.Query = Qry

	res.Execute

'	Do

	doc.testfld = res.getvalue("client_name")

'	Loop Until res.IsEndOfData

Else

	Print "Failed"

End If     

End Sub