Vb.net在access数据库中查询 显示 FROM 子句语法错误
代码如下:'----用Repeater控件绑定显示系统动态----Dimsql="selecttop10*fromTch-newsorderbyIDdesc"'最新技术查...
代码如下:
'----用Repeater控件绑定显示系统动态----
Dim sql = "select top 10 * from Tch-news order by ID desc " '最新技术查询语句,返回最新10条
Dim datchNews As OleDbDataAdapter = New OleDbDataAdapter(sql, conn)
Dim dstchNews As DataSet = New DataSet()
datchNews.Fill(dstchNews)
tchRepeater.DataSource = dstchNews
tchRepeater.DataBind()
tchRepeater.Dispose() 展开
'----用Repeater控件绑定显示系统动态----
Dim sql = "select top 10 * from Tch-news order by ID desc " '最新技术查询语句,返回最新10条
Dim datchNews As OleDbDataAdapter = New OleDbDataAdapter(sql, conn)
Dim dstchNews As DataSet = New DataSet()
datchNews.Fill(dstchNews)
tchRepeater.DataSource = dstchNews
tchRepeater.DataBind()
tchRepeater.Dispose() 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询