 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
7086
註冊時間: 2004-11-26 文章: 1 來自: 广西
第 1 樓
|
發表於: 星期五 十二月 03, 2004 11:58 pm 文章主題: 执行SQLEXEC()时出错提示:不能把VFP函数做数组 |
|
|
部分原程序如下:
&&----------------------------remote
remote_updatabds=""
WITH thisform.pageframe1.page1
remote_updatabds=remote_updatabds+"centrex_number=?trim(.txt_tel_centrexnum.value),"
remote_updatabds=remote_updatabds+"l3=?trim(.txt_tel_l3addr.value),"
remote_updatabds=remote_updatabds+"pxj_port=?trim(.txt_tel_outsideport.value),"
remote_updatabds=remote_updatabds+"sn_install_number=?jfnameid,"
if remote_updatabds<>"" .and. right(remote_updatabds,1)==","
remote_updatabds=left(remote_updatabds,len(remote_updatabds)-1)
endif
remote_updatabds="update tbl_tel_data set "+remote_updatabds+",demo=?mem"+" where tbl_tel_data.tel_number=?hm"
=sqlsetprop(0,"DispLogin",3)
up_chandle=sqlstringconnect("Provider=MSDASQL;DRIVER={SQL Server};DSN=;SERVER=remote_serverip;DATABASE=oa;UID=oa;PWD=")
if up_chandle>0
up_ok=sqlexec(up_chandle,remote_updatabds)
if up_ok>0
messagebox("succes to up remote database ")
else
messagebox("faile to up remote database " )
endif
else
messagebox("数据库连接不成功!")
endif
sqlcancel(up_chandle)
sqldisconnect(up_chandle)
endwith
执行SQLEXEC()时出错提示:不能把VFP函数做数组!!
单独执行:up_ok=sqlexec(up_chandle,update tbl_tel_data set demo=?mem where tbl_tel_data.tel_number=?hm') 则可成功更新
我该如何做?? _________________ ------------------------
我想学… |
|
回頂端 |
|
 |
garfield Site Admin

註冊時間: 2003-01-30 文章: 2160
第 2 樓
|
發表於: 星期日 十二月 05, 2004 6:13 pm 文章主題: |
|
|
將 remote_updatabds=remote_updatabds+"centrex_number=?trim(.txt_tel_centrexnum.value),"
改成 remote_updatabds=remote_updatabds+"centrex_number='"+trim(.txt_tel_centrexnum.value)+"',"
其它的也要像這樣改 _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|