Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with SPT
Message
From
14/12/2001 03:48:45
 
 
To
14/12/2001 00:09:28
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00594253
Message ID:
00594289
Views:
16
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
Previous
Reply
Map
View

Click here to load this message in the networking platform