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 Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 24th, 2006, 10:59 AM
Authorized User
Join Date: Aug 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help writing SQL Statement/ .net code for function

Good morning,
I have a database (Tests) that has the following fields:
Doc_ID (Text)
Doc_Title (Text)
Test1 (yes/no)
Test2 (yes/no)
Test3 (yes/no)
Test4 (yes/no)
Test5 (yes/no)

Here is my dilema, I do not want to put the same Doc_ID (eg. doc_123) for 3 different tests to be run. (eg. Doc_123 needs Test 1, Test 3, and Test 5 to be run) Is there a SQL statement or maybe a script I can write to call to the Database for that one record to display the results 3 times on my webpage? (Instead of me creating a new Doc_Id for the same record 3 times in the Database) Does this make any sense?
thank you for your help.

Reply With Quote
  #2 (permalink)  
Old August 24th, 2006, 11:22 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

I dont understand, consider the following:

Doc_123 'MyDoc' Yes No Yes No Yes

Pulling that row from the table would tell you that Test 1 3 and 5 need to be run on that document, correct?

"The one language all programmers understand is profanity."
Reply With Quote
  #3 (permalink)  
Old August 24th, 2006, 03:31 PM
Authorized User
Join Date: Aug 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts

but i need it to pull to the web form like this:
doc_123 test 1 .......
doc_123 test 3 .......
doc_123 test 5 .......

I want to write the script that goes to the database and if the record has more than 1 test then it lists them on the webpage.
Currently i have the same record in the database 3 times for 3 tests, when i could have it once using the yes/no function for the test fields.
thank you for your help

Reply With Quote

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
I need help writing a SQL statement kscase SQL Server 2005 3 June 24th, 2007 02:43 PM
Writing client side script in code-behind asp.net sajid_pk ADO.NET 1 January 13th, 2005 08:12 AM
writing client-side script in code-behind asp .net sajid_pk General .NET 1 January 13th, 2005 08:11 AM
Calling a Function within an MS SQL Statement flyin Classic ASP Databases 3 September 5th, 2003 03:10 AM

All times are GMT -4. The time now is 06:03 AM.

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