Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is This Possible????
Message
 
 
À
13/05/1999 09:52:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00218360
Message ID:
00218369
Vues:
21
There may not be keys according to a strict definition of a PK, but what you are describing is a key of sorts. A parameterized view will work and can be used to populate a grid. I see no need for thousands of views because the parameter provides the flexibilty to change the records in the view by changeing the parameter value then issuing Requery().

The problem you may have is if you want to make the view updatable. If so, you have the task of identifying which field or combination of fields make each record unique. I do not envy your position or task if you can not do that.

>Hi Everyone --
>
>Situation and background:
>
>I have an OFFICES table and a VOTERS table. The offices table was created "in-house", but the voters table is a table that another company provided us. The voters table is a very extensive table, which holds thousands of records.
>
>
>* There is no relation between the two tables via a primary key and candidate key. The relationship between the two tables is many-to-many.
>
>Example: an office has many voters and voters can be associated with many offices.
>
>
>I could easily throw a candidate key into the voters table and link it to the offices table to create this many to many relationship. In addition, I could also create a VOTERS ASSIGNMENT table to create two one to many relationships. But, this is "virtually" unrealistic, b/c the data entry involved with such an endeavor would be intense. We would have to "assign" hundreds of thousands of voters to thousands offices!
>_____________________________________________
>
>**I am trying to accomplish the following:
>
>I have a search form that selects a specific office and fires my offices form. When the user arrives to this office form, he/she can view all the detials of the specific office selected.
>
>I am trying to add a new feature to this form. I want to include a grid on this offices form that provides voter demographic information, for each office. Now, our company knows that we have to build thousands of views to extract voters information [one for each office], in order to set filters on the voters to only bring up the voters that can vote in the specific office "district" that was selected by a user on the search form.
>
>Here is the trick>> To have the grid be populated with voter information for that specific office without having a linking key. We know what voters are associated with a specific office based on a district number.
>
>
>Our idea is to build a voters view for each specific office:
>
>Example: My offices form holds hundreds offices>
>
>Here is one>
>
>usa
>florida
>broward
>miami
>mayor
>district 17
>
>I also know this particular office has an ID number, which for arguments sake is the number 3.
>
>***** Can I create a voters view and name the view "3", and create a parameterized view and set a variable to = offices id number? I need to have a way for the voters view I created for the specific office (#3) to be populated in the grid when user selects that office, #3.
>
>I guess what I am asking is, ..... is there a way to pull the correct view for a specific office and have the grid on the form be populated with that view that was soley created for that office? Remember, there is no LINKING KEYS. That is why my idea was to name the view the actual number of the office and reference it that way. Is that ludicrous, or do I have a solid idea???
>
>Thank in advance for any comments or ideas on this situation.
>
>
>Jason
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform