|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Ruey
註冊時間: 2003-03-12 文章: 1698 來自: tunglo
第 1 樓
|
發表於: 星期日 一月 25, 2004 9:43 am 文章主題: Sending the data returned from SQL to our local cursor(轉貼) |
|
|
Sending the data returned from SQL to our local cursor
However, this isn’t the name of the cursor that you bound the form’s controls to. When you design a form, you drag fields from a DBF in the data environment to the screen, thus automatically setting the ControlSource of each field. The ControlSource contains the name of the cursor, a period, and the name of the field (e.g., Customer.Phone.) You can’t use the existing cursor as the third parameter, because SQLExec expects to create a new cursor. But if you append it into the cursor that was opened in the Load event, it won’t break the data bindings. All you have to do is make sure that the field names are the same.
Of course, you can’t simply write
SQLExec ( Handle, [], [ABC] )
SELECT XYZ
APPEND FROM ABC
because ABC is an alias, not a DBF, and the APPEND FROM statement requires a DBF name. However,
APPEND FROM DBF ( [ABC] )
works just fine, since the DBF() function returns the temporary file name that the alias is using (usually something like 30324142.tmp). _________________ #############################
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
學會VFP使用者社區的搜尋,Code才會更有趣~
############################# |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|