Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Tables? Is this possible?

Status
Not open for further replies.

TonyU

Technical User
Feb 14, 2001
1,317
US
I was wondering if one could create tabbles and in turn sql statements on the fly (dynamically) if an option is selected on a previous page.

Example:
We are developing an internal systems that tracks our job progress for all our clients for billing purposes. An on one of our pages there will be either a radio button or check box that IF checked will load a specficic client form to upload data into, if not checked the'll never see that form at all.

So again, can a table be created if this option is clicked?? and If SO, I would also like to know how to dynamically create a select statement from this freshly creqted table.

I'm a web\database developer in training, so please, bear with me.




[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
[wavey]
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
The Select statement for a recordset is just a string. This means that you can dynamically build up the string based on values that on a form. For example:

sql = "SELECT * FROM myTable WHERE myField = '" & Request.Form("myTextBox") & "'"

Hope that helps.
Ladyhawk.
:)
 
You can CREATE a TABLE on the fly as well...

Are we talking SQL-Server or Access or ? This is not a bug - it's an undocumented feature...
;-)
 
We will be using SQL 2000. Thanks
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
Look in SQL-Server Books Online for CREATE TABLE (in the T-SQL Refernece...) This is not a bug - it's an undocumented feature...
;-)
 
LOL.[thumbsup2]
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
;) This is not a bug - it's an undocumented feature...
;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top