Solved

Visual Studio Front End "Web Forms" For SQL Server Tables

Posted on 2016-11-08
5
247 Views
Last Modified: 2016-11-14
Hi Experts,

Is there a ready-made Visual Studio Front End "Web Forms" For SQL Server Tables, that I can use to present my database tables to end user, so he can "view, edit and delete" similar to MS Access forms?

Thanks a lot.
Harreni
0
Comment
Question by:Harreni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 28

Expert Comment

by:Pawan Kumar
ID: 41879935
I think no, there is not a ready made thing in c# for this.
0
 
LVL 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 125 total points
ID: 41880029
In Visual Studio you don't work with predefined forms but you have plenty of objects.
For what you want you can check for DataGridView. It's an object that you can add to a form and bind it to a database table. You might to add some code but after you get used to it you can have almost the same with an Access form with some minutes work.
You may try to google for similar objects from 3rd parties companies. Some are free.
0
 
LVL 28

Assisted Solution

by:Pawan Kumar
Pawan Kumar earned 125 total points
ID: 41880044
Are you working on Windows or web? In any case you have to create you own form and create a connection with the db using ADO.NET to perform DB operations.
0
 
LVL 13

Accepted Solution

by:
Dustin Saunders earned 250 total points
ID: 41880976
Maybe I'm not understanding what you need, but Visual Studio is the form builder.  You use it just like Access to make the form layouts with text boxes, labels, combo boxes, (etc.)  But you will need to write the code for the connections that Access 'automates' for you.  

For example, to get the selection results from a SQL query to put into a data table as suggested you'd need some code similar to this:
public static DataTable GetSelectResults(string sqlQuery, DataTable parameters = null)
        {
            //Build a new datatable with the results from our SQL query.
            DataTable dT = new DataTable();
            string cs = GetConnectionString();
            using (SqlConnection _cs = new SqlConnection(cs))
            {
                _cs.Open();
                SqlCommand cmd = new SqlCommand(sqlQuery, _cs);
                //Add parameters if exist
                PutParameters(cmd, parameters);

                SqlDataAdapter dA = new SqlDataAdapter(cmd);
                dA.Fill(dT);
            }
            return dT;
        }

Open in new window


Then you would need to bind that Data Table to the DataGridView.

But, you would also need to write the code back to the SQL database, it's not a 'linked table' like how Access functions- until you code it that way.
0
 

Author Closing Comment

by:Harreni
ID: 41887346
Thanks a lot experts for these nice explanations.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
get count of orders by customer Sql Server table. 3 48
Replace statements HTML with HTML IF 8 64
database audit for object access 6 42
SQL query 45 41
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question