Print Page | Close Window

Probably a simple error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4286
Printed Date: 30 March 2026 at 6:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Probably a simple error
Posted By: mtarby
Subject: Probably a simple error
Date Posted: 16 July 2003 at 11:29am

I've spent all morning trying to write my own page, not rely on UltraDev, but I have a problem I think I've been staring at for too long.  I'm creating a detail page where someone can read the full text of a news article by clicking on a link.  My problem is writing a select statement that pulls the correct record:

Here's my link from the first page:  <a href="displaypage.asp?recordid=<%=strSQL.Fields("NewsNo").Value%>">Click for more details</a>

And here's my select statement on the detail page:

<%
 dim m_strDSN, news, strSQL, NewsNo
 NewsNo = CInt(Request.QueryString("recordid"))
 m_strDSN=Application("DBDSN")
 set news = server.createobject("ADODB.Connection")
 news.open m_strDSN
 set strSQL = news.Execute("Select * from DailyNews where recordid = "& NewsNo")"

%>

Which gives me a 

Microsoft VBScript compilation error '800a03ee'

Expected ')'

Suggestions?

Thanks in advance!




Replies:
Posted By: michael
Date Posted: 16 July 2003 at 12:30pm
set strSQL = news.Execute("Select * from DailyNews where recordid = "& NewsNo)

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: mtarby
Date Posted: 16 July 2003 at 12:34pm
Thank you very much - that did it!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net