User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the IT Technologies and Trends section within the IT Water Cooler category of DaniWeb, a massive community of 423,123 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,129 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our IT Technologies and Trends advertiser: Affiliate Marketing

PHP vs ASP... the big ShOwdOwN

Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 4
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: PHP vs ASP... the big ShOwdOwN

  #5  
Feb 15th, 2002
You better believe it. Here's how to run get a record set from an SQL database in ASP and display it. This is one of the shortest way to write it.


Dim objConn, objRS

Set objConn = Server.CreateObject ("ADODB.Connection")
objConn.Open "database"

Set objRS = objConn.Execute ("select * from table")

While Not objRS.eof
Response.Write objRS("user_namex")
objRS.Movenext
Wend

objRS.close
objConn.Close


Now in ColdFusion

<CFQUERY NAME="objRS" DATASOURCE="Database">
select * from table
</CFQUERY>

<CFOUTPUT QUERY="objRS">
#user_namex#
</CFOUTPUT>

any questions?
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
All times are GMT -4. The time now is 6:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC