Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2016-11-08
5
Medium Priority
?
528 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 30

Expert Comment

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

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 500 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 30

Assisted Solution

by:Pawan Kumar
Pawan Kumar earned 500 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 1000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

715 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