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

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
HarreniAsked:
Who is Participating?
 
Dustin SaundersConnect With a Mentor Director of OperationsCommented:
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
 
Pawan KumarDatabase ExpertCommented:
I think no, there is not a ready made thing in c# for this.
0
 
Vitor MontalvãoConnect With a Mentor MSSQL Senior EngineerCommented:
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
 
Pawan KumarConnect With a Mentor Database ExpertCommented:
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
 
HarreniAuthor Commented:
Thanks a lot experts for these nice explanations.
0
All Courses

From novice to tech pro — start learning today.