在服务器上执行没问题,但在客户端操作时提示如下:
行:1
字符:9
错误:缺少')'
代码:0
具体代码如下:
string upfilen = this.upfilename.Value.Replace(@"\",@"\\") ;
string strConn = "Provider=Microsoft.Jet.Oledb.4.0;Data Source=\""+@upfilen+"\";Extended Properties=\"Excel 8.0\""; 
OleDbConnection conn = new OleDbConnection(strConn);
OleDbDataAdapter adp = new OleDbDataAdapter("select * from [sheet1$] ",conn);  ;
adp.Fill(this.ds,"book1");
this.DataGrid1.DataSource = ds.Tables["Book1"].DefaultView;
this.DataGrid1.DataBind();
conn.Close() ;调试了一下如果加上ADP.FILL(THIS.DS,"BOOK1")就会有上述错误提示,若屏蔽它及后续语句没问题。
如何解决呢?