Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create table
Message
De
05/05/2005 09:16:48
 
 
À
05/05/2005 07:54:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
01011191
Message ID:
01011257
Vues:
16
>hi,
>thanks.
>can i make it like uder via form--->inti
>Select mytable name into cursor csrMyCursor moh.

You can have your SQL select wherever you want, in the .Init() if you know at that time what cursor user wants and that he ewants it straight away on entering the form. If your grid doesn't "know" what its control source is, at design time, then you have to set it up programmatically as in my example.

Your example would seem to be fine. It's likely your grid columns won't be the correct width for the table fields in them, and you may want to have nicer column headers, etc.. SO you may have to add the code as below:
     With Thisform.grdVarZoneData
      .FontSize		 = 8
      .RecordSource	 = "CENSUSZN"
      With .Columns(1)
	.FontBold		 = .T.
	.ControlSource	 = "CENSUSZN.ZONE"
	.Header1.Caption	 = "Zone"
	.Header1.FontBold	 = .T.
	.Width		 = 33
	.Bound		 = .F.
	With .text1
	  .ControlSource	 = "ZONE"
	  .Visible	 = .T.
	EndWith
      EndWith

      With .Columns(2)
        ... etc.
      EndWith
    EndWith    && Thisform.grdVarZoneData
>
>you man i must repait all fields ...
>
>With thisform.grdMyGrid
>  .RecordSource = "csrMyCursor"
>  .Column1.ControlSource = "csrMyCursor.Field1"
>  .Column2.ControlSource = "csrMyCursor.Field2"
>  .Column3.ControlSource = "csrMyCursor.Field3"
>  ... etc.
>
>thanks.
>
>
>>>hi all,
>>>
>>>i need to create temperory table, at my form , and build grid via this table.
>>>after save ,drop this table, if i run my form again ,creat it again,
>>>
>>>if this form sharing ,if any user run this form he get deffirent table ,
>>>
>>>thanks.
>>
>>You can create your temp table via Select ... into cursor csrMyCursor .... ReadWrite.
>>
>>Then you can set up your grid by:
>>
>>
>>With thisform.grdMyGrid
>>  .RecordSource = "csrMyCursor"
>>  .Column1.ControlSource = "csrMyCursor.Field1"
>>  ... etc.
>>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform