Is there a .NET version of ADOX.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ADOX is the extension ADO. And I wonder if there is any extension for ADO.NET? I need a object model in C#, with which I could easily access the schema of a database.
 
Hi,

AFAIK, ADOX is not supported in ADo.NET and to use it you'd need to play
with COM Interoperability.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


Laser Lu said:
ADOX is the extension ADO. And I wonder if there is any extension for
ADO.NET? I need a object model in C#, with which I could easily access the
schema of a database.
 
On Sun, 30 May 2004 01:46:01 -0700, "Laser Lu"

Although you can use ADOX in .NET applications to get schema and any
of the other things ADOX does, you can get the schema of a database by
using the GetOleDbSchemaTable method of the Connection object.
ADOX is the extension ADO. And I wonder if there is any extension for ADO.NET? I need a object model in C#, with which I could easily access the schema of a database.

Otis Mukinfus
http://www.otismukinfus.com
 
Although you can use ADOX in .NET applications to get schema and an
of the other things ADOX does, you can get the schema of a database b
using the GetOleDbSchemaTable method of the Connection object

You can, of course, read the schema information from the SchemaTable, but you can not modify the schema in your code. For example, if you want to change the name of a table or a field programmatically, then how to do it? So I wonder if there is a purely .NET based object model to modify the shema of a database?
 
Hi Laser,

No, there isn't.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Laser Lu said:
of the other things ADOX does, you can get the schema of a database by
using the GetOleDbSchemaTable method of the Connection object.

You can, of course, read the schema information from the SchemaTable, but
you can not modify the schema in your code. For example, if you want to
change the name of a table or a field programmatically, then how to do it?
So I wonder if there is a purely .NET based object model to modify the shema
of a database?
 
¤ >Although you can use ADOX in .NET applications to get schema and any
¤ of the other things ADOX does, you can get the schema of a database by
¤ using the GetOleDbSchemaTable method of the Connection object.
¤
¤ You can, of course, read the schema information from the SchemaTable, but you can not modify the schema in your code. For example, if you want to change the name of a table or a field programmatically, then how to do it? So I wonder if there is a purely .NET based object model to modify the shema of a database?

If you want to modify schema then you will have to use the SQL DDL language for the database type
you are working with. As was mentioned there is no equivalent to ADOX in .NET.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Is it possible to rename a table or a filed just using SQL DDL

----- Paul Clement wrote: -----
If you want to modify schema then you will have to use the SQL DDL language for the database typ
you are working with. As was mentioned there is no equivalent to ADOX in .NET


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic
 
¤ Is it possible to rename a table or a filed just using SQL DDL?
¤

That would depend upon the database. I don't think you can use SQL DDL to rename an Access table or
column. In SQL Server you can use the stored procedure sp_rename.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top