Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.

Reply With Quote
  #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!
Reply With Quote
  #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
Reply With Quote
  #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.

Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:23 AM.


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