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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using database access scripts in HTML

Status
Not open for further replies.

apexinternet

Programmer
May 28, 2001
30
US
I need to be able to code a full sql/database application which normally I would code in an .asp document..but in an html...

I thought about vbscript but am not sure if it would work

the asp code looks like this..but this will not run in an html document.

Please help if you can.

<%
sqls2=&quot;select * from siteinfo&quot; ' choose all site global info
sqls=&quot;SELECT * from sites&quot; ' choose all sites
set conn=Server.CreateObject(&quot;ADODB.Connection&quot;) ' create database connection
conn.open &quot;dsn=newdriverapps&quot;
set rs=conn.execute(sqls) ' execute scripts
set rs2=conn.execute(sqls2)
findquery=&quot;select * from sites where id=&quot;&rs2(&quot;currentsiteid&quot;)
set rs3=conn.execute(findquery)
cursite=rs2(&quot;currentsiteid&quot;)
if rs3(&quot;id&quot;)<rs2(&quot;totallinks&quot;) then cursite=cursite+1 ' if current url is too high go back to 1
if rs3(&quot;id&quot;)=rs2(&quot;totallinks&quot;) then
cursite=1
end if
response.write &quot;id=&quot;&rs3(&quot;id&quot;) & &quot;* totallinks=&quot;&rs2(&quot;totallinks&quot;)&&quot; * currentsiteid=&quot;&rs2(&quot;currentsiteid&quot;)
'set rs4=conn.execute(&quot;update siteinfo set currentsiteid=1&quot;)
set rs4=conn.execute(&quot;update siteinfo set currentsiteid=&quot;&cursite)
currenturl=rs3.Fields(&quot;siteurl&quot;)
set rs=nothing
set rs2=nothing
set rs4=nothing
set conn=nothing
%>

Christopher Norris
Director, IS/IT Development/Application Engineering
Evision Marketing Group L.L.C.

God is GOOD!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top