I want to retrieve a list of all schemas in a given Sql Server database. Using the ADO.NET schema retrieval API I get a list of all collections but there is no
Try this query here:
SELECT * FROM sys.schemas
This will give you the name and schema_id for all defines schemas in the database you execute this in.
I don't really know what you mean by querying the "schema API" - these sys. catalog views (in the sys schema) are your best bet for any system information about databases and objects in those databases.