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. 清高手指点

解决方案 »

  1.   

    把 Adpt8.Fill( Ds8, "这里改成实际的字符串试一下");
      

  2.   

    刚才看了,你把你的sql语句打出来执行看看有没有问题。
    再把DataSet new 一下看看
      

  3.   

    what is in leixing3?leixing3 = "YOurTableName"??
    Dim SQL8 = "Select * From " & leixing3 & " order by 时间 desc"make sure you have the table indicated by leixing3 and it has  column named 时间
      

  4.   

    或者就用
    Ds8  = new DataSet()  
    Adpt8.Fill(Ds8)
     
         zonghe.DataSource = Ds8.Tables( 0 ).DefaultView
          zonghe.DataBind()
    我用C#去套VB不知道是不是这样写
      

  5.   

    try:
    Dim Database = "Data Source=" & Server.MapPath( "wszliu6699.mdb" ).Replace("/","\\")
      

  6.   

    to:exboy(kuku)改成改成实际的字符串没问题
      

  7.   

    from与变量名和order之间没有空格,就成了fromtableorder,肯定错误了。
      

  8.   

    to:思归   leixing3 = request("type")
      

  9.   

    Dim Ds8   As   DataSet
    改成
    Dim Ds8   As  new DataSet 
      

  10.   

    Fill: expected a non-empty string for the SourceTable name. Parameter name: srcTable 
    fill 期望一个非空字符串作为源数据表名。 参数名称:srcTablesrcTable应该事fill方法的第二个参数,说明你的leixing3应该是空字符串,单步调试一下或者write出来看看。另外"Select * From" & leixing3 & "order by 时间 desc"这样拼sql语句的话也会有问题,至少在from后面和order前面留一个空格吧。