ADODB.Connection.OpenSchema from C#.NET 2.0
- From: "Photog" <photog@xxxxxxxxxxxxxxxx>
- Date: Thu, 6 Jul 2006 09:46:54 -0500
I'm using ADO (through the ADODB interop assembly) from inside a C# .NET
application.
I'm trying to use ADODB.Connection.OpenSchema to return table and column
info from an MS Access database.
Here's the call:
rs = m_cn.OpenSchema(ADODB.SchemaEnum.adSchemaTables,
new object[] {null, null, tableName, "TABLE"}, null);
m_cn is an object of type ADODB.Connection. The variable tableName is a
string holding the name of the table for which schema info is desired.
When the code is exectued, a COMException is thrown with the following
message:
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
I've successfully run this code in VBA as follows:
OpenSchema(adSchemaTables, Array(Empty, Empty Empty, "TABLE"))
Any ideas why the call from .NET is not working? I've successfully run
SELECT, CREATE and UPDATE statements in this environment - it's just
OpenSchema that's giving me problems.
Thanks for your help...
.
- Follow-Ups:
- RE: ADODB.Connection.OpenSchema from C#.NET 2.0
- From: Kevin Yu [MSFT]
- RE: ADODB.Connection.OpenSchema from C#.NET 2.0
- Prev by Date: Re: Multiple-step operation generated errors. Check each status value.
- Next by Date: why can I not get autonumber value to add to another table in data
- Previous by thread: Multiple-step operation generated errors. Check each status value.
- Next by thread: RE: ADODB.Connection.OpenSchema from C#.NET 2.0
- Index(es):