Re: Bogus rows in schema rowset
From: Bob Altman (rda_at_nospam.com)
Date: 05/19/04
- Next message: ed_iv2001: "Oracle procedure dataset"
- Previous message: Josh Blair: "Generic connection string for MSSQL, JET, ODBC using OleDbConnection?"
- In reply to: Kevin Yu [MSFT]: "RE: Bogus rows in schema rowset"
- Next in thread: Kevin Yu [MSFT]: "Re: Bogus rows in schema rowset"
- Reply: Kevin Yu [MSFT]: "Re: Bogus rows in schema rowset"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 May 2004 19:12:56 -0700
Hi Kevin,
Here's another data point: When I try to get to the Oracle database using
Microsoft Access via an ODBC connection, Access is able to display the data
in most of the tables, but it chokes when it tries to display the data in
certain tables. The error message is completely useless. (Sorry, I'm on
the road, so I can't reproduce the issue and get the exact error message.)
My suspicion (not yet confirmed) is that the tables that Access chokes on
are also the tables that exhibit this "bogus rows in the schema dataset"
problem.
Curiously, Access has no problem displaying any of the tables in "design"
view. But, interestingly enough, the field properties (such as Text field
max length) sometimes differ from the data in the schema rowset. My
suspicion is that Access uses some other mechanism for getting the field
properties from the Oracle provider...
Anyway, here are bits and pieces of cut-and-pasted code:
Const ORACLE_CONNECTION_STRING As String = "Provider={0};Data
Source={1};User ID={2};Password={3}"
Const ORACLE_PROVIDER As String = "MSDAORA"
Dim cnOra As New OleDbConnection
' Open the Oracle database
cnOra.ConnectionString = String.Format( _
ORACLE_CONNECTION_STRING, _
ORACLE_PROVIDER, _
OracleServerPath, OracleUserID, OraclePassword)
' Get the schema rowset
dim SchemaDataTable as DataTable = cnOra.GetOleDbSchemaTable( _
OleDbSchemaGuid.Columns, _
New Object() {Nothing, Nothing, tableName, Nothing})
- Bob
"Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
news:OVfBL7JPEHA.3080@cpmsftngxa10.phx.gbl...
> Hi Bob,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you are getting bogus rows when using
> OleDbConnection.GetOleDbSchemaTable to retrieve column information for a
> table. If there is any misunderstanding, please feel free to let me know.
>
> Could you show us the code that how you get the schema? Since
> GetOleDbSchemaTable can get information for databases, tables and columns,
> I would like to see your code to retrieve the information for column.
> Please also check if there is another identical table in the database, so
> that all the columns for both tables might be get from the server.
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
- Next message: ed_iv2001: "Oracle procedure dataset"
- Previous message: Josh Blair: "Generic connection string for MSSQL, JET, ODBC using OleDbConnection?"
- In reply to: Kevin Yu [MSFT]: "RE: Bogus rows in schema rowset"
- Next in thread: Kevin Yu [MSFT]: "Re: Bogus rows in schema rowset"
- Reply: Kevin Yu [MSFT]: "Re: Bogus rows in schema rowset"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|