B
Brad Navarro
Hello,
Does anyone know if it is possible with .NET to load an XSD file and
use that as a database schema template to generate a new database? I
had hoped I could load the XSD file into a System.Data.Dataset object,
and then pass that to something like a
System.Data.SqlClient.SqlDataAdapter object and then invoke a method
that would create a database (or schema within an existing database),
but I don't see any method to do this.
I'm looking to do this because, although we are currently developing on
SQL Server 2000, we are looking to start supporting Oracle, and
possibly other databases as well. Right now, I generate about 1/2 of
the database using stored procedures that have calls like exec("create
table " + @TableName + "...") along with proprietary XML configuration
files to determine how to call these SPs. It's a bit clunky, and won't
port so easily to other databases, so I'm looking to streamline
database agnostic schema generation with something a little more
standard and robust, and my hope was that XSD and .NET would have some
kind of solution for me.
Has anybody done anything similar to this?
Does anyone know if it is possible with .NET to load an XSD file and
use that as a database schema template to generate a new database? I
had hoped I could load the XSD file into a System.Data.Dataset object,
and then pass that to something like a
System.Data.SqlClient.SqlDataAdapter object and then invoke a method
that would create a database (or schema within an existing database),
but I don't see any method to do this.
I'm looking to do this because, although we are currently developing on
SQL Server 2000, we are looking to start supporting Oracle, and
possibly other databases as well. Right now, I generate about 1/2 of
the database using stored procedures that have calls like exec("create
table " + @TableName + "...") along with proprietary XML configuration
files to determine how to call these SPs. It's a bit clunky, and won't
port so easily to other databases, so I'm looking to streamline
database agnostic schema generation with something a little more
standard and robust, and my hope was that XSD and .NET would have some
kind of solution for me.
Has anybody done anything similar to this?