Are your two areas ("Associated Quotes" and "Bibliography") on the same 
page? 

I guess I am wondering is how are you posting the data to a table if the 
form has not been submitted yet?

You could wait to create the ID when the form is actually submitted. Just 
run a query for the Max(studyID)+1 AS NewStudyID, then post your new 
records to the DB. Or maybe I am not clear on the path you are taking. 

Soren







Mike Crain <[EMAIL PROTECTED]>
05/12/2004 14:37
Please respond to active-server-pages
 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        [ASP] Updating tables with ID's that do not yet 
exist.


I'm trying to write an ASP page (Classic, not .NET) for a study tool 
and I'm running into problems. Here is the scenario:

I go to a form and fill in various text boxes, or dropdowns. Then 
comes the part I need some advice on. I have two areas "Associated 
Quotes" and "Bibliography". I want to store these in a separate table 
as shown below.

 Study              Quotes                    Biblo 
____________       ______________           ____________ 
| studyID   |      | QuoteID    |           | BibloID  |
| Date      |      | StudyID    |           | StudyID  |
| User      |      | QuoteText  |           | Book     |
|<Others>   |      |____________|           |__________|

What I want to do on the page that you fill out the study page, to 
have a way to create entries in the other tables. But I don't have a 
study ID until the form is actually submitted and a SQL Insert Stored 
Procedure is called, so I can't do a simple pop-up box. I could 
create the studyID when you hit the page, but I want to avid blank 
entries if the user hits this form and just hits the back button. 

Does anyone have any ideas? Am I making this too complicated? Would 
this kind of thing be easier to run in .NET? I was trying not to use 
that as a solution as I do nit really know a lot about .NET as of yet.

Mike C




--------------------------------------------------------------------- 
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
---------------------------------------------------------------------~->

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to