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 January 24th, 2006, 05:55 AM
Friend of Wrox
 
Join Date: May 2005
Location: , , .
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Default data from multiple tables

Hi,
I have a general question.
Is it a good practice to get the data from multiple tables like the following.Does it affect the performance?IF yes what way should I use to get data from multiple tables:
what sql query for ex?

Rs.open "SELECT * FROM layout",Conn,3,3
Rs2.open "SELECT * FROM config",Conn,3,3
Rs3.open "SELECT * FROM cards where cards.cardid=" & intCardID &" and cards.active=1",Conn,3,3
Rs4.open "SELECT * FROM bg where active=1",Conn,3,3
Rs5.open "SELECT * FROM music where active=1",Conn,3,3
Rs6.open "SELECT * FROM effects where active=1",Conn,3,3
Rs7.open "SELECT * FROM poems where active=1",Conn,3,3


  #2 (permalink)  
Old January 24th, 2006, 06:32 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Yes and no.

Yes - If the data base you are using is not relational
No - If the database you are using is relational

;;;Does it affect the performance?
The more you ask the server to do the more resources you will use. If you MUST do it this way you could put your recordsets into arrays, Set them to nothing and close your connection in the head of the page - this will help performance.

;;;IF yes what way should I use to get data from multiple tables
Research the following and it will become clear how to build a datastore that allows you to write smart queries:
- Whats a relatioanl datastore
- Normalize tables
- Use primary and foreign keys

Then look at:
- SQL Joins

After looking at these subjects it will become clear

Wind is your friend
Matt


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to insert data in multiple tables? dstein4d Access VBA 3 November 18th, 2008 09:16 AM
Inserting Data into Multiple Tables bfoley SQL Server ASP 1 January 3rd, 2008 12:28 AM
Inserting data in multiple tables rohits PHP How-To 1 August 29th, 2006 11:32 PM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Split Data into Multiple Tables jemacc SQL Server 2000 20 June 19th, 2004 03:40 PM





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