how to use ado.net to manage a dynamic database?

G

gobis

Hello all,

I am working on a csharp database application that should give its end
users the ability to create new tables related to existing ones or
even create the database structure completely on their own.

I know how to do that by creating a DataSet object and adding tables
and relations to it, etc. but I found no way of creating queries on
this dataset created within the application.

I know how to connect to an exiting (Access) database and fill/edit/
update tables and call up queries, but then I see no way of creating
new tables within that existing database and creating table adapters
for connecting to those new tables.

According to my brief search over newsgroups, a few other people asked
about ways to create new tables on data servers and they seem to have
gotten negative answers.

If anyone can tell me the ways of
a) creating queries on a dataset created within an application
b) creating new tables in a database managed by an application

I will be grateful.

Best wishes for everyone,
Hurol Aslan
 
G

Guest

Gobis,
To keep things simple, you can execute any legal SQL Statement via ADO.NET.
So if you have a "CREATE TABLE" statement that is syntactically correct, all
you need to do is make that statement the CommandText of your SQLCommand and
execute it.
Having said that, there are much more sophisticated ways and classes for
performing DDL on a database.
Peter
 

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

Top