Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table View
Message
De
23/01/2010 04:06:48
 
 
À
22/01/2010 15:19:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01445042
Message ID:
01445604
Vues:
28
>>>>>>>>>
>>>>>>>>>ok so is ID like the number of the table?
>>>>>>>>
>>>>>>>>Sorry, I haven't looked at the whole thread. My assumption is that Naomi expects the table to look like this:
CREATE TABLE Test (ID int, Name C(20))
>>>>>>>>INSERT INTO Test (Id,Name) VALUES(1,"Tom")
>>>>>>>>INSERT INTO Test (Id,Name) VALUES (2,"Dick")
>>>>>>>>INSERT INTO Test (Id,Name) VALUES (3,"Harry")
>>>>>>>
>>>>>>>well no i have a view that gets 3 names and i show them when i load the form.
>>>>>>>
>>>>>>>what you said previously looks cool i get it
>>>>>>>i have and ID problem is i cant used it like that cause it differs
>>>>>>
>>>>>>OK - show use *your* data and maybe we can tell you how to extract what you need.
>>>>>
>>>>>well its gone be hard.
>>>>>I used a View
>>>>>V_clients
>>>>>
>>>>>number                   name                           type
>>>>>1                                    jerry                             3
>>>>>2                                     peter                             2
>>>>>3                                     pan                               8
>>>>>
&& views dont look like that but i cant show pictures
>>>>>
>>>>>now i can set the control source of the text boxes
>>>>>but if i do v_clients.name thats only going to get jerry in the first text box i need peter and pan in box 2 and 3
>>>>
>>>>Is 'number' an actual field in your view? If so just use 'number' instead of 'Id' in the Select statement
>>>
>>>well number is not 1,2,3
>>>but now that u mention it you think i should add it?
>>
>>Well at least it would make the suggested solution viable......
>
>
>getting a new field to a view isnt so easy.
SELECT RECNO() as ID,Name FROM Test INTO CURSOR T
SELECT T1.Name as Name1, T2.Name as Name2, T3.Name as Name3 FROM T T1,T T2, T T3 WHERE T1.ID=1 AND T2.ID=2 AND T3.ID=3
But this is *horrible* code. You need to rethink this from scratch....




>i used combo boxes and set the control sources to the view and that worked to some extent as i only get the names that are in teh view like all three and i can select but thats not wha ti want
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform