ADOX --> ADO.NET Help

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

Guest

Hi Everyone,
Is there a way to get the schema from the database using ADO.NET like you
could with ADOX. I would like to write a small project that will take the DB
structure and create functions for me. I have many stored procs that have
over 50-100 parameters and hand writing these is very tedous. So far I have
not seen anything in the help, unless I missed it. THanks for any input.
Michael
 
Michael said:
Hi Everyone,
Is there a way to get the schema from the database using ADO.NET
like you could with ADOX. I would like to write a small project that
will take the DB structure and create functions for me. I have many
stored procs that have over 50-100 parameters and hand writing these
is very tedous. So far I have not seen anything in the help, unless
I missed it. THanks for any input. Michael


System.Data.OleDb.OleDbConnection.GetOleDbSchemaTable



Armin
 
Michael said:
Is there a way to get the schema from the database using ADO.NET like
you could with ADOX. I would like to write a small project that will
take the DB structure and create functions for me. I have many stored
procs that have over 50-100 parameters and hand writing these is very
tedous.

If you're trying to get the details of stored procedure parameters (which
I'm guessing you may be from your question), and you're using SQL Server
2000 or later, you can use the INFORMATION_SCHEMA views to do retrieve this
information for you.

\\\
select *
from INFORMATION_SCHEMA.PARAMETERS
where SPECIFIC_NAME = 'stored_proc_name'
///

There are a number of similar views (see the Views section in the master
database in Query Analyzer or Enterprise Manager for the rest) and they can
give you a huge amount of information about the db schema in a
forward-compatible manner.

HTH,
 
Hi Everyone,
Thanks for the replys. I will look into the options. I started to look at
ADOX in .Net, but I was hoping to do it in pure .Net. I'll take a look at the
links you all provided. Thanks again for the suggestions.
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top