Design Question - Insert into one table once, but another table multiple times?

Hello.

I'm wondering what my best options are here....

I have one MSSQL2005 table I'll call MSTR_BOL and one called DETAIL_BOL.  The idea is to have one page where a user can enter into MSTR_BOL a header record so to speak.  This header record would have such items as BOL number, Customer number, Carrier and so on.  Then below that (on the form) would be an area to enter DETAIL_BOL items for that MSTR_BOL records.  The link between the two tables would be BOL number.

The catch is for a given MSTR_BOL records there are, or can be, multiple MSTR_BOL records.  So, for MSTR_BOL I might have:
MSTR_BOL.BOLNBR
MSTR_BOL.CUSTOMER
MSTR_BOL.ADDRESS

In DETAIL_BOL I might have:
DETAIL_BOL.BOLNBR
DETAIL_BOL.PART
DETAIL_BOL.QTY

I need a way to be able to input the MSTR record, then the DETAIL but the input boxes for the DETAIL need to be added to the form dynamically it seems.  DETAIL_BOL.BOLNBR(0), DETAIL_BOL.PARTNBR(0), and DETAIL_BOL.QTY(0) would be one record, then there would or could be DETAIL_BOL.BOLNBR(1), DETAIL_BOL.PARTNBR(1), DETAIL_BOL(1) and so on.

I need to insert the MSTR record then subsequent inserts would be inserting details for that MSTR into the DETAIL table.

Hope this makes a little sense as to what I am trying to accomplish.  Any suggestion on how I can do this using VWD2005?

Thanks!
0
TwoGoldens
6/21/2006 3:47:39 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

0 Replies
657 Views

Similar Articles

[PageSpeed] 59

Reply:

Similar Artilces:

DB Design: One Table or Multiple Tables?
I am developing a Content management system of sorts and I want it to be pretty flexible. I have noticed that with web content (News, Articles, Events, FAQs) that there is a lot of similarity between these items. They all have the same basic fields: TitleSynopsisBodyStartDateEndDate (for News, Articles, FAQs start and end date can be used for content expiration. For events, they are used for the actual event dates.) But for some types of content, I will need fields specific to that type. For instance, I want to have a few custom settings for a "Photo Gallery" type, like, how many ro...

can I compare one record from one table to another record in another table?
can I compare one record from one table to another record in another table? I need to test if this condition is met. My scenario is: i need to check one table for a value and compare it to a list of records. for example, table 1           columnrecord 1- applesrecord 2- orangesrecord 3- grapes table 2            col1   col2   col3    col4record 1- Null , Null, Null, grapes I need to compare table 2 records with a list of records from table 1. the fru...

a question about pipe two tables's data to another one table
PB9.0, three ASA database tables, product (column:productID, producer),customer(column:customerID , name), product_customer(column:productID, producer,customerID , name). here is my question: after i pipe table product 's column to the table product_customer's column(productID, producer), i need to pipe the table customer's row of column(customerID , name ) to the table product_customer's column(customerID , name), so i built another pipeline object to do this (i dont want to get one pipeline object to pipe the two tables product and customer to the table product_c...

How to search multiple table which table name is store in another table and join the result together?
I have one control table to store all related table name  Table ID                   TableName      1                           TableA      2                           TableB   In Table A: Rec...

How to move data from one table to another table w/o affecting the table definition?
Hello All! I have a production server and a development server. On the production server, I have a table (thin a database) that already contains data. On the development server, I created a table (still within another database) and I want that table of the development server to contain the data from the table of the production server. But, both tables don't have the same table definition, meaning in the table of the development server, I have added a new column named ID that I want to use as a primary key column, but I don't have tha...

Replace one table with another table
 Hello!I am trying to build an application that regularly fetch data (stock-prices) from a third part, which I then present on my site. The hard task, for me at least, is to guarantee that the data the presentation tier use never are truncated. When I run it on my computer I use a dataset from where the presentation tier get all data. Last in my update method I copy all my updated database tables to a temporary dataset. Last I run :Application["DataSet"] = temporaryDataSet.Copy(); In that way I think I never risk to have the dataset only partly filled with updated data during ...

Retrieving from one table where not in another table
I have two tables, contacts and deleted_contacts. I would like to pull a list of names from contacts where that contact_id does not exist in deleted_contacts. This what I have tried that does not work: SELECT first_name, last_name FROM contacts WHERE created_by_user_id = '" + uid + "' AND contact_id NOT EXISTS (SELECT * FROM deleted_contacts); Any help woudl be greatly appreciated! Thanks! -DAGTA SELECT first_name, last_name FROM contacts WHERE created_by_user_id = '" + uid + "' AND contact_id NOT EXISTS (SELECT * FROM deleted_contacts WHERE ...

Reading from one table and then storing it into another table
I want to (and succeeded)  read information from one table in my database ([services] in this case) and display them in a table with an additional column with a textbox so that I can enter volumes in it. So far so good, this works fine. But I now want to store all the volumes together with the ID's in a seperate table ([service_volume]) by clicking the Submit button. Does anyone know how to achieve this?  <%@ Page Language="VB" %> <%@ Import Namespace="System.Data.SqlClient" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/...

How to change the Rows of the one table to another table
I want's to change the layout of my table at run time on the basis of some of my Setting File[I don't want's to use webpart orwebzones]Suppose I have three Tables with number of rows.[In reality Each row will contain some controls]On Page_Preinit I want's to set the rows of one table to another also want's to change order of the rows.How Can I do that ?  <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/...

copy column from one table to another table
Hi, I have 2 tables. Table1 has column1 and column2. I wish to copy column1 into Table2 by using sql statement. How do i do that? Thank you. In general you'd do it like this: Insert statement: INSERT INTO Table2 ( Column1 ) SELECT Column1 FROM Table1 Update statement: UPDATE Table2 SET Column1 = T1.Column1 FROM Table2 T2 INNER JOIN Table1 T1 ON T2.someID = T1.someID TerriTerri MortonEngagement Manager, NeudesicHow to ask a question...

one dataset table to multiple table dataset...
Hi,I have a dataset datatableselect ORDER ,DESCRIPTION,FIRSTNAME,LASTNAME,ADDRESS,ZIPFROM Order               I need to select only FIRSTNAME,LASTNAME,ADDRESS,ZIP and insert in to new table called CONTACTS which has identity column CONTACTKEY. Then i need to select order and description and insert in to new table ORDERS which has ORDERID as identity column with one more column CONTACTKEY which has a foreignkey relationship to order table so when i am inserting the rows for orders the same contactkey should be updated in to...

iTextSharp
Hi,Im starting to use iTextSharp to create a PDF file based on the informations filled in my page form. So i created 3 tables to fit the form: One table as header, containing base informations as page number, title of form...  And the other 2 tables containing the form data itself, such as names, fones, and 2 large fields for observations. Since the user can enter lots of text information on the observation field (and therefore, the PDF may have more then 1 page), I was trying to repeat the header table on every page. So I used the EndHeaders(), but its not working. In my code i ha...

pass data from one table to another table
hi i am building a shopping cart... and the cart is done in the form of table..i just want to pass all the data from one table to another table for example..someone has confirm his orders on the cart table, i want to pass all the confirm orderes to the ordered table.. later will remove all the confirmed orders in the cart table.. how can i do that?? i am using a sqldatasoure and i am trying to pass in the way below but failedINSERT INTO [History] ([CartID], [HProductName], [HQuantity], [HUnitPrice], [HTotal], [HUsername], [OrderedTime]) VALUES (@CartID, @CProductName, @Quantity, @UnitPr...

Moving Data from one table to another table
------=_NextPart_000_0000_01C4ECC5.9C8C7660 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Maybe this is a little OT but since I am a beginner @ perl, I thought that I would post it! So, I am trying to move data from one sql table to another table called logs_archive. It seems that I am running into some problems with memory as I am moving this much data from one table to another. This is just syslog data but we need to archive it in some way. Can anybody give any advice? Code is below. $sth = $dbh->prepare( ...

table splited into multiple tables, what's the procedure of updating multiple tables in GridView?
hello all, i have a 5-table normalized database, with primary keys and foreign keys ...and when i present the data using GridView, i use a VIEW the collects columns from all tables ...the problem is that, when using GridView & SqlDataSource, the SqlDataSource update command doesn't work because it has to update multiple tables.so i'm asking what's the right procedure when using normalized DB and GridView that make me enable editing and deletion built in GridView's capablities ?  thx all in advance. GLORY~Please mark as answer if this helps u~  use so...

Web resources about - Design Question - Insert into one table once, but another table multiple times? - asp.net.presentation-controls

West Lothian question - Wikipedia, the free encyclopedia
He illustrated his point by pointing out the absurdity of a Member of Parliament for West Lothian being able to vote on matters affecting the ...

Question of the Day: Worst automotive regulatory workaround?
Filed under: Automotive History Jacking up the entire car to meet headlight-height laws, adding sketchy plastic seats to a pickup bed to skirt ...

Excellent Question from an Awful Candidate
Cholly Pierce notes that tribble-topped presidential aspirant Rand Paul actually asked an important question during last night’s GOP debate shit-show: ...

The Paris climate conundrum — three facts and a question, by @Gaius_Publius
The Paris climate conundrum — three facts and a question by Gaius Publius He's been to London and to Gay Paree. A fine live performance ( source ...

Chris Matthews Really Doesn’t Like Questions About His Leg
Politics can be so exhausting. Sometimes you just need to have a little fun. And all of us, no matter where we fall on the sociopolitical spectrum, ...

Two cities, two shootings, one question: Why?
Los Angeles County sheriff’s deputies murdered 28-year-old Nicholas Robinson on Saturday, December 12. Like the murder of Mario Woods by San ...

Tom Brady Leaves Press Conference After Two Questions About His Friendship With Donald Trump
This morning’s cover of the New York Daily New s features the headline “BRADY HAS NO BALLS” over a picture of New England Patriots quarterback ...

'Star Wars: The Force Awakens' Cast Fields Your Fan Questions
ET got the cast to answer a few of your fan questions at the premiere.

For Designers, Learning To Code Isn't A Yes-No Question
The former CEO of Berg explains why programming is just one way that designers ought to make sense of problems. From 2005 to 2014 (or 483 weeks ...

Answering The Question: What Are The Real And Frightening Risks Within Healthcare Security?
Connected medical devices are transforming healthcare. Unfortunately, security is too often an afterthought for the clinical engineering and ...

Resources last updated: 12/17/2015 3:20:37 PM