Using GetOleDbSchemaTable to get SQL Server Field Description - using

  • Thread starter Thread starter pete
  • Start date Start date
P

pete

Hi All,

I am trying to get the field desriptions from SQL Server
2000 using GetOleDbSchemaTable (see code below)
Now this returns a description field to the DataTable, but
the field is empty. I know my fields have descrptions
assigned to them. Has anyone seen this before, is it a bug
in ASP.NET. or am I missing something?

I am using win2000 server / IIS5 / .NET v1.0.3705 /
SQLServer2000.


Dim strTableName As String = "MyTable"
Dim myConn As OleDBConnection = New OleDBConnection
(ConfigurationSettings.AppSettings("strMyConnString"))
myConn.Open()
Dim schemaTable As DataTable = myConn.GetOleDbSchemaTable
(OleDbSchemaGuid.Columns, New Object() {Nothing, Nothing,
strTableName, Nothing})

myDataGrid1.DataSource = schemaTable

myDataGrid1.DataBind()
 
Pete,

I have just tried this using C# and Oracle and I also
didn't get any comments brought back.

Jon
 
Back
Top