From Table to Table

I am working in Delphi 4 and ran into a roadblock I am unfamiliar with. I am trying to search and find values in one table based off of matching values in another. For example a table of objects with fields like name, description, type, ect; and a table of object properties in which each object can be represented multiple times based on the settings on the page at the time. So if i search the object property table (and eventually loop through to repeat for all objects) to find all cases of visible objects
 when a certain criteria is met. It stops on the first object with "Yes" in the 'ObjectVisible' Field. while still on that record I go to the 'IdObject' field and find it is object 12. Then moving to the Object Table I want to go to the 'IdObject' record 12 and pull information from it. How to I go to the desired record each time after moving to a new table? Perhaps I am over thinking but seeing as how I am trying to loop through for multiple object I feel like I took on too big a task. Unfortunately my b
ackround in this is not very deep and I am learning as I go. 
Thanks for any support or advice.
0
Anonymous
5/3/2012 2:54:48 PM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

2 Replies
1665 Views

Similar Articles

[PageSpeed] 18
Get it on Google Play
Get it on Apple App Store

Ryan DiMaria wrote:

> I am working in Delphi 4

With all three updates installed? D4 was possibly the buggiest release.

Bill
0
William
5/3/2012 8:00:26 PM
"Ryan DiMaria" wrote in message news:465762@forums.embarcadero.com...
>I am working in Delphi 4 and ran into a roadblock I am unfamiliar with. I 
>am trying to search and find values in one table based off of matching 
>values in another. For example a table of objects with fields like name, 
>description, type, ect; and a table of object properties in which each 
>object can be represented multiple times based on the settings on the page 
>at the time. So if i search the object property table (and eventually loop 
>through to repeat for all objects) to find all cases of visible objects
> when a certain criteria is met. It stops on the first object with "Yes" in 
> the 'ObjectVisible' Field. while still on that record I go to the 
> 'IdObject' field and find it is object 12. Then moving to the Object Table 
> I want to go to the 'IdObject' record 12 and pull information from it. How 
> to I go to the desired record each time after moving to a new table? 
> Perhaps I am over thinking but seeing as how I am trying to loop through 
> for multiple object I feel like I took on too big a task. Unfortunately my 
> b
> ackround in this is not very deep and I am learning as I go.


You need two table datasets to do this. You do not say what database so I'll 
assume the BDE (Paradox or dbase tables) and thus the use of TTable 
datasets.

One dataset on each of these two tables. If there is an index on IDObject 
then you can hook these two datasets together at design time in a 
master-detail relationship, however it is not hard to do in code either.

So for the Property TTable, you can set a filter to show only those with 
ObjectVisible='Yes'. You can now loop through those records using the 
Table's First and Next methods (While its Eof property remains false).

For each record in the loop above you can now use the Object table's FindKey 
method to get to the record there matching the IDObject field in the 
property table.

-- 
Wayne Niddery (TeamB)
"'Thank you, Occupy Wall Street. With your vivid example of anticapitalist 
squalor, I've been able to convince all three of my children to become 
investment bankers"  - P. J. O’Rourke
0
Wayne
5/4/2012 12:34:23 PM
Reply:

Similar Artilces:

Tables?! Why Tables?!
Bit random...but why does everything have to be rendered as a table?  It's starting to get quite annoying.  Formview - does this need to be a table?  the Menu??  Wouldn't it make sense to allow the option to...say...not render a Menu as a table?  Am I the only one that thinks this or are there others?  www.internetgeeks.co.ukwww.norwichbookclub.co.uk You can use CSS Adapters to create your own adapters to override how the controls render it self. In the next version of ASP.Net, you will probably have more flexibility to specify the surrounding elements of th...

Database table to formview to other table
Okay here's my situation I'm trying to make a page that the user is presented witha a single text box. This text box would be used to entering problems, complaints, etc. Apon Pressing insert there is a number of other fields that would be hidden that would be used to create a complete ticket to be written to a ticket database, this information would be pulled from a USer database using the User's login... Where I'm at... I currently am Using a Select statement for my User table, and an Insert Statement for my Tickets table. They are both in the same datasource and using Us...

Database tables and lookup up tables?
Ok say I would like to build a table for of the following questions(say 6 questions for the sake of argument): Do I just stored the index of the radiobuttonlist. What are some resources that I could look at. Should I make a look up table. 5) If money were no object, I would live . . . Prefer not to say On a tropical island In a New York penthouse In an English castle On a Texas ranch In a Malibu beach house In a mountain retreat (Selected) On the moon None of the above 1 ---> 2 ---> 3 ---> 4 ---> 5) --->6 ...

Link FoxPro Database table to SQL Server Database table
I have LAN Server in witch Visual Foxpro Database reside.I have another remote server in witch SQL Server 2005 installed.I want to link Foxpro table to SQL Server Database Table.Is it possible? Can please someone help? Thanks MS...

a little help with transfering table A in Database A into table B in database B
I can't seem to find a good tutorial in transfering data from one table in database a into a different table in database b. The catch is that the fields in the tables don't match exactly. How can I do this? Examples, tutorials, etc are greatly appreciated.Thanks!Graphfixz Data & Web Designhttp://www.graphfixz.com All you need is INSERT INTO with column list that will give you control of how you the the insert into the new database, the other option was to use DTS.  Try the link below for the INSERT INTO statement.  Hope this helps.http://msdn.microsoft.com/library/def...

alter table of table A causes trigger on table B accesseng table A to fail
hi, i recently faced a strange problem, i have two tables, table A and table B table A has a update trigger which updates data in table B. i altered table B to add two more columns. after which when i updated table A(modifying 1 row), my tran log got full. there was a threshold proc which got fired but it did'nt help much. i though the tables had been corrupted. ran dbcc tablealloc on syslogs, table A, table B, no errors. Just to be sure I ran a dbcc checkdb, checkalloc and checkcatalog - no errors i recreated the trigger - no use. dropped the trigger. updated the table it ...

Merge two database tables to a third table
I have two tables for an employee database. I am creating a schedule for a particular days work. So table 1 is the entire list of employees, and table 2 is an exception table of vacations, sick time off, etc... I want to be able to create a report for a particular day, merging these two tables, and either removing that person who is on vacation from the report, or making an indication in a datagrid. Once this is viewed, I want the entire datagrid contents dumped to another table for history. 1) Can/Should the initial merge be done with SQL statement, if so how? 2) I have tried do...

converting 3 database tables to 1 table
Hello, i've got a problem with receiving data from my database. I've got 3 tables: Log & LogDetail & Categorie 1 log corresponds with 12 LogDetails. Each logDetails corresponds with one Categorie Table LOG: Name Type Description PK FK ID ID Int Unique nr. from log X   X ServerID Int Reference to a server   X   Datum Datetime Date from log       Table LogDetail : Name Type Description PK FK ID ID Int Unique nr. fro...

Table inside a Table results in a gap at the bottom of the table
All,When I put a table inside a table, it leaves a gap at the bottom.When you then have tables inside tables inside tables this gap becomes cumulative and are left with a hude gap at the bottome of the web form which is unwanted. Can anyone help. Cheers  Give height="100%" and width="100%" of inner table.Also check you had not given cellspacing and cellpadding with big value.BrindeshSoftware Developer,India.If you found that this is right answer then mark it as answer, so that future readers get benefits of it....

What is the difference between #table and ##table
If i create a ##table using my stored procedure, I can do the select * from ##table but when i created the #table using the stored procedure and tried to do the select * from #table I am getting the error message invalid object #table that means it is going out of scope. But if i create the ##table, will that table going to remain in the database even until i drop the ##table or it gets dropped when i close the database connection. Thank you very much. -Raj There are two types of temporary tables: Local temporary tables The names of these tables begin with one n...

table in a table in RDLC
Using just one datatable how can I show a table by the first group (say customers) and in it a table of customer specific information? When I put a table in a footer cell of the customer, It shows all the details of all the customers in it.  I am not sure if I understood your requirement. Do post back with more details in case you meant something else.I suppose you want to filter the datatable for each customer. You can create a DataView and filter it for one customer before using it. Regards,PrashantDont forget to click "Mark as Answer" on the post that helped you....

HTML Table in Table?
Hi All Could I build a HTML table in a HTML table with the outlook of the inner table is one of the cell of the outer table? It is because I found my inner table always smaller than the cell of the TD. What I want to do is the inner table to 100% fill all the td of the outer table? Regards Alex  Hi hnchanyou can easily do it. Pardon for my suggestion, but if you want to do it dynamically then you can use HTMLTable, HTMLTableRow, HTMLTableCell classes to build your table at run time. and easily add cell to your row by simply row.Add method and same for adding table to row.hope...

Table in Table Dynamically?
Hi First a note of thanks to many - ~Rick in particular - for the help earlier given. I have a table in which I can add rows and columns. It is fine. Now I want to add a second table as a row to the first table with code. How does this work? I tried creating second table and created rows in second table with cells (No problems). Now how do I add the second table to first one (adding in the additional row) with code? I tried the following. Table my2Table = CreateTable2(); // This routine creates table 2. No errors and works fine. Table1.Rows.Add((TableRow)(my2Table)) // Er...

copying from table to table
I would like to copy the contents of one column in a table to another table. However, the first column of type double while the column it is being copied to is a varchar. Any ideas? Let's talk about the ideal situation. If the first table is 1 column and you can just blatently update the other table with the value, create a pipeline from the numberic table/column to the character table/column. Go to the SQL pane and change the SELECT "number_table"."anum" FROM "number_table" To SELECT string("number_table".&quo...

Web resources about - From Table to Table - embarcadero.delphi.database

Table tennis - Wikipedia, the free encyclopedia
Table tennis , also known as ping-pong , is a sport in which two or four players hit a lightweight, hollow ball back and forth using table tennis ...

Motorhead fans pay tribute to fallen Lemmy with petition for 'Lemmium' on periodic table
Heavy metal fans lost one of their most iconic icons over Christmas with the sudden and unexpected death of Motorhead frontman, Ian "Lemmy" Kilmister. ...

Man, 21, falls 100m down Table Top Mountain
... himself down a mountain at Toowoomba after he fell from a significant height on Wednesday. Queensland Ambulance Services were called to Table ...

With this dowry I own your son: Indian brides turn tables
... India's efforts to stop baby girls being aborted are seeing the circulation of some surprisingly hard-hitting videos that are turning the tables ...

How Waiting Tables Made Me A Better Lawyer
According to small-firm columnist Gary J. Ross, this why waiting tables turned out to be good preparation for a legal career.

Zen Pinball Receives Star Wars: The Force Awakens Pinball Tables
Zen Pinball company Zen Studios has announced the release of two new Star Wars-themed pinball tables on mobile devices. Inspired by Star Wars: ...

New ‘Star Wars: The Force Awakens’ tables will arrive on Zen Pinball this week
... Star Wars: The Force Awakens is heading to Zen Pinball this week. The extremely popular, and fun, pinball app is adding two different tables ...

petition asks to have a heavy metal element on the periodic table named after Lemmy
Lemmy w/ Motörhead in Austin, 2015 (more by Tim Griffin) Heavy rock lost its most iconic figure over Christmas with the sudden and unexpected ...

Why homeowners are leaving billions on the table
More than 5M borrowers could qualify and benefit from a mortgage refinance, according to a new report.

Rand Paul and Carly Fiorina are bumped down to kiddie table debate ... and Rand is having a tantrum
The tell-me-again-why-this-exists kiddie table Republican presidential debate is getting some new blood in Thursday’s Fox Business Network debate. ...

Resources last updated: 1/15/2016 8:30:44 AM