ColdFusion, AJAX and web...
<cfquery datasource="cfartgallery" name="qArtists">
SELECT *
FROM artists
ORDER BY lastname, firstname
</cfquery>
<cfoutput query="qArtists">
ID: #qArtists.artistid#<br/>
Last name: #qArtists.lastname#<br/>
First name: #qArtists.firstname#<br/>
<br/>
</cfoutput>
Java code
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection conn = DriverManager.getConnection("jdbc:odbc:artgallery");
Statement smnt = conn.createStatement();
ResultSet res = smnt.executeQuery("SELECT * FROM artists " +
"ORDER BY lastname, firstname");
while(res.next())
{
System.out.println("ID:" + res.getInt("artistid"));
System.out.println("Last name:" + res.getString("lastname"));
System.out.println("First name:" + res.getString("firstname"));
System.out.println();
}
conn.close();
}
catch (SQLException se)
{
System.out.println("SQLException: " + se.getMessage());
}
catch (Exception e)
{
System.out.println("Exception: " + e.getMessage());
}
You have looked at ASP haven't you?
-
Scott.
By Darryl Lyons, at 4/21/2005 06:59:00 pm
Not recently. Do you mean, ASP is pretty similar, or?
Looking at an example from W3CSchools.com:
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("/db/northwind.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select * from Customers", conn
do until rs.EOF
for each x in rs.Fields
Response.Write(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br />")
next
Response.Write("<br />")
rs.MoveNext
loop
rs.close
conn.close
%>
So easy with Coldfusion, right? Try to make a select over a table with 1 milion rows (or much less).. Good by coldfusion..
[]s
Why would you want to return one million rows to a client app?
That's bad programming no matter what language you're using. Most DBAs would shoot you.
By Unknown, at 7/01/2010 01:02:00 pm
You need something to prove your true love, Tiffany jewellery of heart pendant can be the best choices. Tiffany necklaces can be the best choice. You know, silver necklaces can be a fashion and beautiful gift whether you give your love or true friends. Let them show their charm. They will be moved by you that you are so considerate. Tiffany pendants will never out of time just like your love and your friendship.
MISSION IMPOSSIBLE retailers enjoy a good margin and an increasing number of people are taking to purchasing MISSION IMPOSSIBLE DVD in bulk from a wholesaler and selling them on auction sites such as EBay and online stores. Several MISSION IMPOSSIBLE DVD COLLECTION distributors offer drop shipping and mail the DVDs directly to the end consumer on the retailer's behalf.