程式中
先 Imports Namespcae
再宣告WebMethod 的函數
在函數有 執行 OdbcDataAdapt.fill(ds1)
再把 Return ds1
再來是 建置方案
沒問題之後, 測試 run 看看
可以看到網頁上有剛宣告的函名稱
點了之後在下一頁選 "叫用"
出現
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC 驅動程式管理員]
找不到資料來源名稱且未指定預設的驅動程式
請問該如何解決?
謝謝
註:1.確定ODBC 驅動程式設定沒錯, 也存在
2.以下是程式
<WebMethod()> _
Public Function Test() As DS
Me.odbcDataAdapter1.Fill(ds1)
Return ds1
End Function
==> 本文由 "Arthur <Art...@discussions.microsoft.com>"
> 於 news:E4052DF0-F741-40ED-B9B1-E7A31695181B%40microsoft.com 發表
--
風禹科技驗證有限公司 ASP.NET Web News Reader 0.2.3 UTF-8 Beta
網站地圖 http://tlcheng.twbbs.org/wwwmap.htm
流域防洪/區域水資源/徐昇網/玫瑰圖/語音通訊 文章與程式
Basic/Fortran/Windows API/.Net/輔助說明檔 原始碼、文章與討論
微軟程式設計新討論區 MSDN 技術論壇,網友回覆後即時簡訊、電子郵件通知:
http://forums.microsoft.com/msdn-cht/default.aspx?siteid=14
--
ASPNET News Reader http://tlcheng.twbbs.org/News/Reader.aspx
RSS 2.0 http://tlcheng.twbbs.org/News/rss2.aspx?Action=List&Newsgroup=microsoft.public.tw.dotnet.framework.webservices
謝謝回覆
"璉璉" 來函:
> 沒看到你指定資料來源的連線字串,只看到 Fill 沒啥用。
所以請確認你的 系統管理工具 資料來源 有 VFPTble 這個名稱。
你也可以直接自己組連線字串,例如:
Driver={Microsoft Visual FoxPro Driver}; DBQ=d:\PROJS\TestWebSerservice\Data; ...
另外請確認這個目錄有提供寫入權給執行 Web Service 帳號的權限。
==> 本文由 "Arthur <Art...@discussions.microsoft.com>"
> 於 news:7323D32B-42E2-43A6-BB8A-C16C5DC66385%40microsoft.com 發表
--
Database container (.DBC):
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\myvfpdb.dbc;Exclusive=No;NULL=NO;Collate=Machine;BACKGROUNDFETCH=NO;DELETED=NO"
Free Table directory:
"Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=c:\myvfpdbfolder;Exclusive=No;Collate=Machine;NULL=NO;DELETED=NO;BACKGROUNDFETCH=NO"
"Collate=Machine" is the default setting, for other settings check the list of supported collating sequences >>
==> 本文由 "璉璉 <de...@tainan.com.tw>"
> 於 news:000d01c6d807%2476a84df0%240a03a8c0%40tlcheng 發表