I just wanna ask if there's a way in C#/ASP.NET to create 'dynamic' tables/fields similar to phpMyAdmin:
开发者_如何学PythonAny suggestions/comments?
Its not clear if you want code here or a tool.
If you want code then DDL (something that I suspect a surprisingly large number of people are not sufficiently aware) will do the job for you - I'm not sure if there are open source admin projects out there (there's this, but its way out of date: http://sourceforge.net/projects/asp-ent-man/) - ah, the MS one is one Codeplex: http://www.codeplex.com/SqlWebAdmin - again not up to date, but it will almost certainly work.
If you're just after tools then you should probably be on serverfault (-: This isn't exactly what you want as it lives in IIS Manager but it may be of interest: http://www.iis.net/expand/DatabaseManager (the Web Platform Installer is your friend!)
You mean like the CREATE TABLE statement?
Just remember that most DDL statements like CREATE TABLE are RDBMS-specific (i.e. the one I linked to is for SQL Server, the one for MySQL is different as is the one for Oracle, etc).
SQL and ADO.NET. You pass create/update/delete scripts to the database. There are a lot of security precautions to take heed of.
How does PhpAdmin create DYNAMIC tables? To me it looks like it creates normal tables - like any admin tool.
Now, here is a hint: * From C# you can submit any SQL statement you like, they are basically just text. * Since the dawn of time, when your ancestors where still hunted by sabretoth tigers, SQL has what is called "DDL" - Data Definition Langauge. Stuff like "CREATE TABLE", "ALTER TABLE", "DROP TABLE". * They are all properly documented in - the documentation.
Sorry if that sonds a little snippish, but this is really really really basic SQL.
精彩评论