Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 9th, 2007, 01:10 PM
Authorized User
 
Join Date: Jan 2007
Location: , , USA.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jonsey Send a message via Yahoo to jonsey
Default Using Classes in Classic ASP Help

Learning how to use Class in Classic ASP. What I looking to do is create a class that would run a SQL query and build a table. The reason for this is that I may use this function more than a few times in my application would be easier to call a function rather than writing it out every time plus helps keep my code nice and clean.

  #2 (permalink)  
Old March 11th, 2007, 04:23 PM
Friend of Wrox
 
Join Date: May 2005
Location: , , Norway.
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The art of reusing code

If I have understod you right, this maight be some help. From the book Beginning ASP 3.0 I do read;

"In order to avoid writing this same code in many places throughout the page we can put it into a subprocedure:"

Am I to go any further with this, will it be any help, let me know! Or is it the query and the table which is the case?

Mvh
grstad

---------------------------------------------------------------------


Internet has become favorable with that tool...thank you Tim Berners-Lee!
  #3 (permalink)  
Old March 12th, 2007, 07:21 AM
Authorized User
 
Join Date: Jan 2007
Location: , , India.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to saurabhj Send a message via Yahoo to saurabhj
Default

You can use procedures and functions.

-Saurabh
  #4 (permalink)  
Old March 13th, 2007, 07:51 AM
Authorized User
 
Join Date: Jan 2007
Location: , , USA.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jonsey Send a message via Yahoo to jonsey
Default

Thanks for the help went to the book store over the weekend and pick up a copy of it. What I end up doing is creating a function that had different types of SQL statements and then build out a data grid for it that would automatically build out the table.

  #5 (permalink)  
Old March 13th, 2007, 12:34 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can certainly use classes in Classic ASP. It is easy to do, and I recommend it highly as it is the only mechanism for providing anything close to encapuslation in ASP.

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Classic ab289 Classic ASP Basics 6 March 10th, 2008 02:53 PM
Converting Classic Asp to Asp.Net 2.0 vikaspatyal ASP.NET 2.0 Professional 2 October 7th, 2007 06:33 PM
ASP classic looping twice melkin Classic ASP Basics 2 September 6th, 2007 01:00 PM
asp.net vs classic asp "URGENT" naeem_ul_hussan Classic ASP Professional 1 August 1st, 2007 03:14 PM
classic asp with asp.net on same iis bostonrose .NET Framework 2.0 6 January 10th, 2007 12:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.