RE: Coldfusion vs ... Oh dear!

by "Mike Carlson" <domitianx(at)domitianx.com>

 Date:  Sat, 11 Aug 2001 17:22:37 -0500
 To:  "'Mike Carlson'" <domitianx(at)domitianx.com>,
<hwg-techniques(at)hwg.org>
  todo: View Thread, Original
You don't have to set it to nothing, you do just to make sure it gets
destroyed.

MyConnection.Close
Set MyConnection = nothing <--- not needed. Just good practice to ensure
it gets destroyed.

You really don't need </html> either, but it is good practice to put it
there.

Well an ASP recordset isnt much different:

Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=SQLOLEDB; Data Source=SQlServer; Initial
Catalog=dbName; User ID=UserName; Password=Password; Network
Library=dbmssocn;" Set RS=Server.CreateObject("ADODB.RecordSet")
Query = "SELECT * FROM tbl"
RS.Open Query, MyConn

OR even better, I use a function that is passed a couple parameters to
get my recordset stored in an array  and then manipulate the array any
way I want to with the data.

We just don't have a tag. Put it as an include and it is no different
than the CF tag. If you know how to reuse code and use Functions/Subs
and Server Side Includes as they should be there is actually less code
on each individual page. Create a Sub to pass some parameters to and you
could call it a tag if you wanted.

Where do you set where you want the recordset stored. On the client or
the server? What ype of cursor? Can you move backwards and forwards,
skip records etc with the default cursor or can you select different
types of cursors to use depending on the type of application? 

If I open a recordset of 280,000 records to sort, trim or multiply, I
don't want that recordset hanging around on the server taking up
resources, I want it on the client. Use JavaScript or VBScript to do the
functions on the data on the clients machine.

It may be quick and easy, but I want total control over the data, where
I put it and how I use it.

The whole point is control. I want complete control.

I can access Active Directory to provide complete user management and
security across a world wide enterprise. I can Access Novell NDS. I can
access Exchange data stores. I can access Lotus Notes data stores. I can
use Word, Excel or Notepad as a data store.

It may be very easy to use, but the scope is pretty limited when you
think of ASP having access to everything in Windows.

Also, my understanding is that you don't get full featured native db
support unless you have the enterprise version of the server.

If you are building a simple website like an online catalog or schedule,
CF may be fine, but if you are working with a world wide enterprise that
requires domain or tree level security along with being able to access
any type of data store from SQL Server to Excel to text files, you need
something more robust.

The clients I have (averaging cost of development is between $10K and
$20K) require enterprise wide applications.

I did some work where a worker in Korea needed access to about a 12
different web applications across a bunch different servers in different
parts of the globe. Tap into ADSI for permissions, Excel, Access and SQL
Server for the data and voila.

You can build a car with a do it yourself, order over the web car kit,
but I aint gonna race it in the Indy 500. I would stick with putzing
around the neighborhood.

All these tags that are built into CF isnt any different than me writing
a function or sub and storing it in a SSI and including it on the page
and there are litterally millions of sites that have functions you can
copy and put in your code library.

PHP is good too I hear. I have never coded in it, but getting it set up
on Windows was a pain in the butt. If you use PHP stick with the *nix
platforms it was designed for. You will save you some grey hair.

The only thing that may be in the neighborhood of ASP is JSP, but that
has a lot of "extra code" too.

=)

********************
Mike Carlson
domitianx(at)domitianx.com
http://www.domitianx.com
******************** 

-----Original Message-----
From: rudy [mailto:r937(at)interlog.com] 
Sent: Friday, August 10, 2001 8:14 PM
To: Mike Carlson
Subject: Re: Coldfusion vs ... Oh dear!


>MyConnection.Close
>
>Seems simple enough.

are you an ASP programmer?  i'm not

but i know there's more, you have to actually set something = nothing


>Forgive my ignorance with CF but this opens a query:
>  <CFQUERY>
>    your query goes here
>  </CFQUERY>

actually, that runs the query and returns the result set


>Where do you set what kind of database you are connecting to?

you do that in the CFQUERY tag, you have to give the query a name and
also a datasource

(yes, i was being vague on purpose -- ASP guys *hate* that)


   <CFQUERY NAME=getmyrecs DATASOURCE=mydatabase>

> And I get a recordset. Nothing else at all just type those little
> words and a magic recordset shows up.
>
> Or am I wrong?

that's pretty much it

and you should see CFOUTPUT, it's just as simple



rudy

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.