Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


DBGrid records order

Posted on 1998-08-13
Medium Priority
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
Question by:oberdan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 1362009
can you give an example?

Author Comment

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.


Expert Comment

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


Expert Comment

ID: 1362012
yep, rickpet has a good solution

Accepted Solution

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

I hope this solved your problem...


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

704 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