Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Windows Forms updating Views?

Posted on 2011-10-25
5
Medium Priority
?
154 Views
Last Modified: 2012-05-12
I am a complete novice to Visual Studio 2010/SQL Server 2008, after migrating from Microsoft Access.

Currently we are using SQL server as the backend, with 2 different Access frontends, one for the Manager, the other for the Engineers.

We have a form Called frmJobReports, which has a subform called frmJobReportsSub

The frmJobReports is the detail of the Job, the subform frmJobReportsSub is basically the worksheet for that Job, which could be assigned to multiple engineers.

The Manager inputs the job detail onto the main form and then assigns the Jobs to the engineers using the subform.

The engineers received “their” Jobs based on a View created in SQL which uses the tblJobReports and tblJobReportsSub (the sub is used to filter the records to the logged-in engineer (from terminal services login)).

We want to allow the engineers to update the main form, which is possible in Access, but in Visual studio Windows Forms, this does not seem possible? I gather Views cannot be updated.

Is there a way around this? Many thanks in anticipation.
0
Comment
Question by:SparkyP
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 37024905
Views in SQL can be updated under certain conditions. You can find those details here: http://msdn.microsoft.com/en-us/library/aa214068(v=SQL.80).aspx
0
 

Author Comment

by:SparkyP
ID: 37029435
I have read the article and still cannot understand why I cannot get the Update, Insert or Delete Statements in the the TableAdaptor configuration Wizard for the View (which combines the main table and the subtable). Yet I can get all those statements when I run the wizard on the individual tables.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 37033595
I think you may have to write queries yourself as the view combines multiple tables

http://www.asp.net/data-access/tutorials/updating-the-tableadapter-to-use-joins-vb

0
 

Author Closing Comment

by:SparkyP
ID: 37038446
This was just what I needed. Not easy for me, but have learned a great deal.

Many Thanks
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37040409
Glad to help :-)
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

810 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