当使用SharePoint Designer时,我发现这个链接让我了解如何使它工作:
http://spsolution.blogspot.com/2008/12/how-to-insert-data-source-in-sharepoint.html
这允许SharePoint Designer与Oracle交谈,但是当我在页面上放置数据视图时,它给了我以下错误:
执行Web部件时出错:System.Data.OracleClient.OracleException: ORA-00923:从关键字找不到预期的地方 在System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle,Int32 rc) 在System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle,CommandBehavior行为,布尔needRowid,OciRowidDescriptor&rowidDescriptor,ArrayList&resultParameterOrdinals) 在System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle,CommandBehavior行为,ArrayList&resultParameterOrdinals) 在System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior行为) 在System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior行为) 在System.Data.Common.DbCommand.Syst ... 09/14/2009 14:40:23.52 * w3wp.exe(0x0FA0) 0x1A88 Windows SharePoint Services Web部件 89a1可监视... em.Data.IDbCommand.ExecuteReader(CommandBehavior行为) (System.Data.Common.DbDataAdapter.FillInternal(DataSet数据集,DataTable []数据表,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令,CommandBehavior行为) 在System.Data.Common.DbDataAdapter.Fill(DataSet的数据集,Int32的StartRecord,Int32的MaxRecords,stringsrcTable,IDbCommand命令,CommandBehavior的行为) 在System.Data.Common.DbDataAdapter.Fill(DataSet的数据集,stringsrcTable) 在System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments参数) 在System.Web.UI.DataSourceView.Select(DataSourceSelectArguments参数,DataSourceViewSelectCallbackcallback) 在Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigatorInternal()... 09/14/2009 14:40:23.52 * w3wp.exe(0x0FA0) 0x1A88 Windows SharePoint Services Web部件 89a1可监视... 在Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator() 在Microsoft.SharePoint.WebControls.SingleDataSource.GetXPathNavigator(IDataSource数据源,布尔originalData) 在Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXPathNavigator(String viewPath) 在Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform()
我很困惑。
看起来您在对数据库执行SQL命令时收到错误。 (OracleCommand.Execute)是eror行。 错误说,它不指望在你的“select * from”中的“from”语句,我会怀疑在传递的命令string中有一些额外的string数据。