Dim Adpt8 As OleDbDataAdapter
Dim Ds8 As DataSet Dim Provider = "Provider=Microsoft.Jet.OLEDB.4.0"
Dim Database = "Data Source=" & Server.MapPath( "wszliu6699.mdb" )
Conn = New OleDbConnection( Provider & ";" & DataBase )
Conn.Open() Dim SQL8 = "Select * From" & leixing3 & "order by 时间 desc" 注:leixing3是我自定义
的变量,没问题
Adpt8 = New OleDbDataAdapter( SQL8, Conn ) Adpt8.Fill(Ds8, leixing3)
zonghe.DataSource = Ds8.Tables( leixing3 ).DefaultView
zonghe.DataBind()为什么运行总通不过
下边是错误信息:
Server Error in '/' Application.
--------------------------------------------------------------------------------Fill: expected a non-empty string for the SourceTable name. Parameter name: srcTable
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 清高手指点
Dim Ds8 As DataSet Dim Provider = "Provider=Microsoft.Jet.OLEDB.4.0"
Dim Database = "Data Source=" & Server.MapPath( "wszliu6699.mdb" )
Conn = New OleDbConnection( Provider & ";" & DataBase )
Conn.Open() Dim SQL8 = "Select * From" & leixing3 & "order by 时间 desc" 注:leixing3是我自定义
的变量,没问题
Adpt8 = New OleDbDataAdapter( SQL8, Conn ) Adpt8.Fill(Ds8, leixing3)
zonghe.DataSource = Ds8.Tables( leixing3 ).DefaultView
zonghe.DataBind()为什么运行总通不过
下边是错误信息:
Server Error in '/' Application.
--------------------------------------------------------------------------------Fill: expected a non-empty string for the SourceTable name. Parameter name: srcTable
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 清高手指点
解决方案 »
- 谁知道好一点的JQuery入门教程推荐一下
- 访问网络文件时出现返回1203,请教解决原因!!![
- 关于百度地图api函数的一个问题
- 我为什么会得不到界面上的textbox呢?【F5在线中】
- 全部分都给你了,怎么样获得SELECT count(name) FROM score的结果? 在线等,急!!!!
- 用asp.net怎么写个创建数据库表的程序
- repeater嵌套问题,大家帮我看看!!!
- 验证控件与调试问题.
- asp.net操作servu6.0配置文件问题!
- 请高手指点方向
- 请高手指点?我的数据库连接字符串在Webconfig中加密后,但运行一个要用连接串的页面请求之后出现错误,,,
- 发帖控键
再把DataSet new 一下看看
Dim SQL8 = "Select * From " & leixing3 & " order by 时间 desc"make sure you have the table indicated by leixing3 and it has column named 时间
Ds8 = new DataSet()
Adpt8.Fill(Ds8)
zonghe.DataSource = Ds8.Tables( 0 ).DefaultView
zonghe.DataBind()
我用C#去套VB不知道是不是这样写
Dim Database = "Data Source=" & Server.MapPath( "wszliu6699.mdb" ).Replace("/","\\")
改成
Dim Ds8 As new DataSet
fill 期望一个非空字符串作为源数据表名。 参数名称:srcTablesrcTable应该事fill方法的第二个参数,说明你的leixing3应该是空字符串,单步调试一下或者write出来看看。另外"Select * From" & leixing3 & "order by 时间 desc"这样拼sql语句的话也会有问题,至少在from后面和order前面留一个空格吧。