Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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
 
Old May 16th, 2005, 06:23 AM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Selecting a table name ... quite hard !!!

This one's quite hard :

- I have one database with a table named "exhibitions" that holds different fields including one called "TITLE".

- Then, in the same database, I have different tables that got their name from the "TITLE" field in the exhibitions table.

Example :

The exhibitions table is like this :
|--ID--|-------Title-------|----Artist----|
   01 My house John
   02 The sun Mary
   03 A bottle David

So in the same Database I have a table named "exhibitions" and then other tables named "My house", "The sun", "A bottle", etc.

I have to insert records in the other tables.
I need to tell my sql to get the "title field" from the exhibitions table and then open the corresponding table.

Any ideas ?!

This is the piece of script I'm working on :

-------------- CONNECT TO DB ----------------------------------
Set Conn=Server.CreateObject("ADODB.Connection")
strConn="driver={Microsoft Access Driver (*.mdb)}; "
strConn=strConn & " DBQ=" & Server.MapPath("exhibitions.mdb")
strConn=strConn & ";pwd=" & strCode
Conn.Open strConn

-------------- SELECT THE TITLE I NEED ------------------------
tab = "select title from exhibitions where id = myId"


------------ THEN ?!?!?!?!?!?!?!?

sql = "select * from TAB" ?!?!?!?


HOPE YOU CAN HELP ME !!!!!
Thanks

Ske






Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting emails by domain (TLD) from MySQL table? hman MySQL 2 January 11th, 2008 04:32 PM
Selecting Data from a table nkrust Javascript 7 January 11th, 2007 05:44 AM
Selecting and Making a table gmoney060 Classic ASP Databases 4 August 19th, 2004 10:06 AM
Windows the hard way astolpho BOOK: Beginning Visual C++ 6 1 March 1st, 2004 05:32 PM
Doesn't recognize hard drive linuxboy Linux 0 October 31st, 2003 02:39 PM





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