Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RETURNING THE MAX ID FROM A TABLE IN WEB PAGE 1

Status
Not open for further replies.

pyttviper

MIS
May 15, 2001
37
US
THE PAGE IS ASP AND USES A CONNECTIONLESS DSN (INCLUDE.FILE)


Set rsNew=Cn.Execute ("SELECT MAX(loco_data.ID) AS Max FROM loco_data")


<td width=&quot;50%&quot;><strong><%=rsNew(&quot;Max&quot;)%></strong></td>

THE FIELD ON THE PAGE IS BLANK BUT THE OTHER FILEDS WORK FINE
 

Perhaps SQL balks because your alias (Max) is a reserved word. Change &quot;AS Max&quot; to &quot;AS Max1&quot; and make the corresponding change in your ASP page. Let us know if that works. Terry

X-) &quot;Life would be easier if I had the source code.&quot; -Anonymous
 
it was so obvious that i didn't see it but you are right
the problem was the the statements originally were hitting an access database but now i am moving it to SQL server and rewriting all of the statements. thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top