What's wrong with this?

I

Ivan Debono

Hi all,

I've got this snippet which is not working:

<%
Dim tDATA
Dim oConn

Call Connect(oConn, "")

Set tDATA = Server.CreateObject("ADODB.Recordset")
tDATA.Open "SELECT * FROM MyTable WHERE id = " &
CLng(Request.QueryString("id")), oConn

With tDATA
If Not tDATA.EOF%>
<p><strong><%=tDATA("name")%></strong><br />
</p>
<font size="-1" face="Verdana, Arial, Helvetica,
sans-serif"><%=tDATA("text")%>
<%End If
tDATA.Close
Set tDATA = Nothing
%>
</font>

Can anyone see the problem??

Thanks,
Ivan
 
A

Aaron [SQL Server MVP]

You have a With tData, but no End With. (And you don't even utilize the
With construct, anyway.)

Otherwise, you're going to have to be a little wee bit more specific about
what "not working" means.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top