Solved

DBGrid records order

Posted on 1998-08-13
5
157 Views
Last Modified: 2010-04-04
I need to build a sistem that uses something like a Orders/Items tables relationship, with a DBGrid to store the Items data. But the typed records order Must not be changed. Something like to ignore the Items index. The typing order must not be changed
0
Comment
Question by:oberdan
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1362009
can you give an example?
0
 

Author Comment

by:oberdan
ID: 1362010
My english is really bad... I'll try to explain.

In my Items table the recods are indexed by Item number. For each Order I'll haveone customer and several items.

I type the customer number and after I will type the items.
If in my items table I have:
 
I hope this helps you.
     ItemNo       Description
       1          Item 1
       2          Item 2
       3          Item 3
 
but in my Order I type 3, 1, 2, this sequence must not be changed.

0
 
LVL 3

Expert Comment

by:rickpet
ID: 1362011
Create another table...we'll call it OrderDetail
This table will hold your Order's Detail info and will have a unique id...OrderDetail_id of type integer. This will be your primary index/key.  As the user inserts an item you generate a unique id for each item...

Order (master table)
  Order_id: integer key
  Customer_id: integer

OrderDetail (detail table)
  OrderDetail_id: integer key
  Order_id: integer key
  Item_id: integer
  Quantity: float

Rick
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1362012
yep, rickpet has a good solution
0
 
LVL 3

Accepted Solution

by:
rickpet earned 100 total points
ID: 1362013
Are you having any other problems with this?

I hope this solved your problem...

Rick
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi application Soap connection 5 118
Delphi Form ownership 4 110
find a node in VST 2 70
Tembedded WB animatid gifs not animated on some pcs 2 83
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question