Domanda

I seriously need some guidance here, so my college teacher gave us this weird assignment, he wants us to create a GUI that displays the tables from the database, allowing the end-user to choose what tables he desires to query, once he has chosen his table(s) what does he desire to do with it? for instance it could be a select, update or delete statement, after that, we have to let them make use of the WHERE clause so that they can be more specific about their queries, not only that, we also have to give them the chance to make join queries, so they can select more than one tables, and also they have be able to select specific fields they want to show from their tables.

So I'm not asking you to make my weird homework, but to give me a starting point, some place where I can begin working this out, or maybe some examples you can provide me to give me a better idea on how to start doing this.

By the way this has to be in either asp.net or asp.net MVC, so I really appreciate any guidance you can provide me, keep in mind this is just a homework assignment, so security issues are not a concern here.

È stato utile?

Soluzione

In order to present the user with a list of database objects, I would look into leveraging SQL Management Objects (SMO).

From there, you can either go the easy way or create a wizard-style interface with steps related to each part of a SQL statement and build up the text behind the scenes.

Once you have a SQL statement to execute, you should review the ADO.NET documentation to find out how to execute it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top