标题:[求助]XML数据阅读器EXecuteXmlReader问题
取消只看楼主
wsl000
Rank: 2
等 级:新手上路
威 望:4
帖 子:248
专家分:0
注 册:2006-3-8
 问题点数:0 回复次数:1 
[求助]XML数据阅读器EXecuteXmlReader问题
Dim constr As String
Dim mycon As SqlConnection
constr = "uid=sa;pwd=bxd;database=exercise;server=qx100"
Try
mycon = New SqlConnection(constr)
mycon.Open()
MsgBox("Sql Server测试成功")
Catch mye As Exception
MsgBox("Sql server测试失败" & mye.ToString)
End Try
Dim mycom As SqlCommand
Dim sqlstr As String
Dim myxr As System.Xml.XmlReader
sqlstr = "select * form t_info for XML AUTO"
mycom = New SqlCommand(sqlstr, mycon)
myxr = mycom.ExecuteXmlReader
While myxr.Read
TextBox1.Text = TextBox1.Text & myxr(0) & "," & myxr(1) & "," & myxr(2) & "," & myxr(3) & "," & myxr(4) & vbCrLf
End While
mycon.Close()
执行到 myxr = mycom.ExecuteXmlReader报错
大家帮忙看一下为什么报错
搜索更多相关主题的帖子: XML 数据阅读器 
2006-04-23 10:12
wsl000
Rank: 2
等 级:新手上路
威 望:4
帖 子:248
专家分:0
注 册:2006-3-8
得分:0 

谢谢
这种错误我是永远也找不出来的
总感觉自己写的代码没有问题


2006-04-23 13:03



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-59421-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.191821 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved