Introduction
Query Management Studio can be run in a browser and it allows the user to manage the database like insert
, select
, update
and delete
operations. QMS is a simple application to understand. You can use this application as GUI for your database. In making this application, I use SQL Server 2005, .NET Framework 3.5 and C#. This article is meant for all kinds of beginner users who want to get started with SQL Server. I have included a small feather of SQL Server like insert
, update
and delete
in QMS.
Background
The basic idea behind making OQMS is that some time ago, I used a hosting panel where I created a table on a server but the server response was very slow and sometimes, the server was getting stuck and not responding. Then I made this web application and using this application, you need to use your SQL Server that is intalled on your machine and it does DDL and DML operations.
Using the Code
For login form: Namespace:
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- using System.Data.Sql;
- using System.Data.SqlClient;
- using System.IO;
- using System.Drawing;
And the C# code is:
- public partial class Entrance : System.Web.UI.Page
- {
- SqlConnection con = new SqlConnection();
- protected void Page_Load(object sender, EventArgs e)
- {
- }
- protected void btncon_Click(object sender, ImageClickEventArgs e)
- {
- if (txtdbase.Text == "" || txtserv.Text == "" || txtuid.Text == "" || txtpass.Text == "")
- {
- Page.RegisterStartupScript("UserMsg",
- "alert('All field should be filled');if(alert){ window.location='Entrance.aspx';}");
- }
- else
- {
- Session["dbase"] = txtdbase.Text;
- Session["sname"] = txtserv.Text;
- Session["uid"] = txtuid.Text;
- Session["pass"] = txtpass.Text;
- Response.Redirect("~/Default.aspx", false);
- }
- }
- }
And the very next form:
Soon I will have a new version available!