Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with SPT
Message
De
14/12/2001 03:48:45
 
 
À
14/12/2001 00:09:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00594253
Message ID:
00594289
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Patrick,

I am also lazy. Try following -
=....
=SQLEXEC(gnConnHandle, "SELECT * FROM sqltable","mytable")
=CursorSetProp("Tables","mytable")
	
Local cNameList,cFieldList

for i = 1 to FCount()
   If i = 1
      cNameList = Field(i) + " " + "mytable." + Field(i)
      cFieldList = Field(i)
   Else
      cNameList  = cNameList  +", "+ Field(i) + " " + "mytable." + Field(i)
      cFieldList = cFieldList +", "+ Field(i) 
   EndIf
EndFor
=CursorSetProp("UpdateNameList",cNameList)
=CursorSetProp("KeyFieldList",field(1))		&& just assume
=CursorSetProp("UpdatableFieldList",cFieldList)
=CursorSetProp("SendUpdates",.T.)
Hope this help you.

Manoj

>Hi
> How do i programatic return all the field name from the SQL table ?
>I have create 115 fields in a SQL table. I am lazy to type all the updatablenamelist & the updatablefielddlist.
>Some code with be appreciated...
>
>Thanks
Manoj Karki
manoj0karki@yahoo.com
Nepal
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform