3

我正在从 Netezza 数据源运行一个简单的 FillSchema

dss = new DataSet();
ad = new OleDbDataAdapter(cmd);
ad.SelectCommand = new OleDbCommand("SELECT * FROM " + objTable.name);
ad.SelectCommand.Connection = cn;
ad.FillSchema(dss, SchemaType.Source);

我收到以下错误:

System.Data.OleDb.OleDbException: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
   at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
   at System.Data.Common.DbDataAdapter.FillSchemaInternal(DataSet dataset, DataTable datatable, SchemaType schemaType, IDbCommand command, String srcTable, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType schemaType, IDbCommand command, String srcTable, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillSchema(DataSet dataSet, SchemaType schemaType)
   at IMS.DF2.IMSCubeGenerator.IMSCube.AddTableToDatasourceView(table objTable) in C:\DIUP\DF2\IMSCubeGenerator\IMSCube.cs:line 902

我在这里做错了什么?

如何找到下面的错误(检查每个 OLE DB 状态值)?

4

1 回答 1

3

你的连接字符串是什么?

它将是您的驱动程序、光标或安全性(我在使用集成安全性时遇到了同样的问题)。

将其更改为用户名/密码解决了我的问题。

有关更多信息,请参见此处此处此处

于 2010-06-27T23:48:07.070 回答