请高手请教关于Web Service的问题?

bin_bin 2003-08-04 06:20:12
为何我做的Web Service 返回值是一个Dataset,此时有值,而在asp.net中引用时却没有值,为何?
...全文
67 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
OOPCattyXin 2003-08-05
  • 打赏
  • 举报
回复
你看看是不是你的Session("ArticleID")的问题。
pegtop 2003-08-05
  • 打赏
  • 举报
回复
DataSet未赋予表,用saucer(思归, MS .NET MVP) 的方法就可以了!
saucer 2003-08-05
  • 打赏
  • 举报
回复
did you set
ds.Tables(0).TableName = "Comment"

or

when you fill it, did you use
DataAdapter.Fill(DataSet,CommentTable)

??
panyee 2003-08-04
  • 打赏
  • 举报
回复
调试到那行了吗?
执行完
ds = Show.ShowComment(Session("ArticleID"), "Comment")
这句后, 把鼠标移到它上头看一下是否为null?
bin_bin 2003-08-04
  • 打赏
  • 举报
回复
Web Service:
<WebMethod(Description:="显示文章的评论", enablesession:=True)> _
Public Function ShowComment(ByVal ArticleID As Integer, ByVal CommentTable As String) As DataSet
Dim show As New DataAccess.CommentDB()
Dim ds As New DataSet()
ds = show.ShowCommentArticle(ArticleID, CommentTable)
Return ds <-- 有一条记录
End Function

ASP.NET:
Dim Show As New localhost.QTServices()

ds = Show.ShowComment(Session("ArticleID"), "Comment")
DgComment.DataSource = ds <-- 显示为空
DgComment.DataMember = "Comment"
DgComment.DataBind()


WHY???
cyp503 2003-08-04
  • 打赏
  • 举报
回复
把代码贴出来

12,165

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧