Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seek record in cursor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00410485
Message ID:
00410942
Vues:
22
>>
>> Hi James,
>>
>> In your case you should just use RecordSourceType=1 && Alias
>>
>> All other code looks just fine.
>>
>> HTH
>
>
>Still isn't right, so I'm giving up on the cursor idea and going with the "into table nofilter" scheme. The only problem now is that all the grid is showing is the same record repeated over and over.
>
>Here's the code in the init of the form:
>
>if thisform.r_noloadhsfrmaddfoals
> return .f.
>else
> select name, yr_bred from master where type = "B" into table namebred nofilter
>inde on name to name
>with thisform.hspageframe1.page1.hsgrid1
> .columncount = 2
> .column1.width = 200
> .column2.width = 75
> .recordsourcetype = 0
> .recordsource = "NAMEBRED"
> .column1.controlsource = "namebred.name"
> .column2.controlsource = "namebred.yr_bred"
> endwith
>locate
>endif
>
>Any ideas on hwo to get the grid to show all the records, not just the first record repeated?
>
>TIA,
>
>Jim Harvey
>jharvey@netrax.net

Jim,

Have you checked the namebred table? What do you have in it? Also, why do you set RecordSourceType to 0? It should be 1, I think. You also don't need to set Columns controlSources, though it should not hurt, I beleive.

I would try the following:

if thisform.r_noloadhsfrmaddfoals
return .f.
endif
select name, yr_bred from master where type = "B" into table namebred && could still be a cursor, I think
index on name to name && If it's a table, you now can use: index on name tag name, also note, that name is reserved VFP word
with thisform.hspageframe1.page1.hsgrid1
.recordsource=''
.recordsourcetype = 1
.recordsource = "NAMEBRED"
* .columncount = 2 && It's also not needed
.column1.width = 200
* .column2.width = 75
* .column1.controlsource = "namebred.name"
* .column2.controlsource = "namebred.yr_bred"
endwith

See, if you will still have problems. If you do, please, e-mail me your form and I'll take a look.

HTH
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform