winzip icon

Universal Database Admin for ASP.NET and SQL Server

Email
Submitted on: 1/3/2015 10:52:00 PM
By: quartz (from psc cd)  
Level: Intermediate
User Rating: By 5 Users
Compatibility: C#, ASP.NET
Views: 1727
 
     Universal Database Admin for ASP.NET and SQL Server----------------------------------------- A dynamic web application needs an admin section for CRUD action of the database, wouldn't it be nice if we can have a universal database administration, which can be plugged to any web application, Just give your sql connection string and it generates pages for Create, Read, Update and Delete ----------------------------------------- Description This following code describes an asp.net web module which can be added /cutomized in any sql driven web application as a database administration. When i first started with an admin section of a web application, i thought why not try to make something more general a plug-n-play admin section which can be used for any SQL driven dynamic web application so here is the result of the effort. ----------------------------------------- The Target was. 1. Create a self sufficient Admin section which can be put into any SQL driven web application by changing the connectionstring for SQL server in web.config ----------------------------------------- 2. User needs to Login before doing the CRUD (create/Read/Update/Delete) operations ----------------------------------------- 3. There should be individual pages one for each operations(CRUD) which will take tablename as parameters ----------------------------------------- 4. A dataAccess class which wraps all the data access methods and returns values or records as required. Assumptions ----------------------------------------- These were the initial thoughts but to make it a general module i made some assumptions 1. Every Table has One Primary Key and It is the First Field in the Table There is atleast one AdminUser table in the SQL database which has a Permission field with value "Admin" for the users to login to the admin section for CRUD operations ----------------------------------------- The Web.config looks like this A Connectionstring and AdminTable name in the web.config <appSettings><add key="ConnectionString" value="Data Source=YourdatasrcIP;POOLING=FALSE; database=YourDatabasename;User ID=YouruserID;Password=YourPassword" />
<add key="AdminTable" value="YourAdminTableName" /> </appSettings> ----------------------------------------- MORE UPDATES AND DISCUSSION AT http://www.codeproject.com/script/articles/list_articles.asp?userid=81898 -----------------------------------------

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
// for :Universal Database Admin for ASP.NET and SQL Server
//**************************************
Universal Database Admin
----------------------------------------------------------------
Copyright © Rajesh Lal, 2005-2006
Email connectrajesh@hotmail.com
Author Quartz (Rajesh Lal - connectrajesh@hotmail.com)
The program is FREE for any non commercial usage. In the case of
modifying and/or redistributing the code it's obligate to retain
the original copyright notice. It is not allowed to create your
own commercial products on the basis of the program or any parts
of it.
Please, contact me for purchase/ modification and redistribution with, remarks, ideas, etc.
also check the EULA.txt for User agreement
www.irajesh.com
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.