473,503 Members | 9,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my table updates but the view that uses it does not

How do you get a view to update when a table it uses is updated? I am using
asp.net, C# and MS SQL.

Thanks in advance - Norm

--
Message posted via http://www.dotnetmonster.com
Nov 19 '05 #1
2 984
Can you expand a bit on what you're trying to do.

-Brock
DevelopMentor
http://staff.develop.com/ballen
How do you get a view to update when a table it uses is updated? I am
using asp.net, C# and MS SQL.

Thanks in advance - Norm


Nov 19 '05 #2
When I run the following code, my table "Forms" updates properly. My
problem is that a View in my database which includes the table Forms, does
not update along with it. My thoughts are that this is a SQL Server issue -
I am presently looking into Triggers to fire off of the updating of the
table. Am I barking up the wrong tree?

Thanks,
Norm

srstr3 = "SELECT * FROM Forms WHERE Formnum = '" + formnum + "'";
sqlConnection1.Open();
sqlDataAdapter4.SelectCommand.CommandText = srstr3;
sqlDataAdapter4.Fill(dataSet71);
sqlConnection1.Close();
DataRow r7 = dataSet71.Tables[0].Rows[0];
r7["GoodQty"] = int.Parse(Label25.Text);
r7["LocationId"] = int.Parse(Label17.Text);
r7["ReworkQty"] = int.Parse(Label26.Text);
r7["RWLocId"] = int.Parse(Label19.Text);
r7["OldNumber"] = Request["oldnum"].ToString();
r7["Notes"] = Request["notes"].ToString();
sqlConnection1.Open();
sqlDataAdapter4.Update(dataSet71);
sqlConnection1.Close();

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200505/1
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3410
by: Bruce Lester | last post by:
Is there a way to create a trigger directly on an inline or multi-line table value function? I am trying to create a quick-and-dirty application using an Access Data Project front-end with SQL...
7
11925
by: Warren Wright | last post by:
Hello, We maintain a 175 million record database table for our customer. This is an extract of some data collected for them by a third party vendor, who sends us regular updates to that data...
2
1663
by: WertmanTheMad | last post by:
MVP's and the like I am looking for suggestions , confirmation Let me start by saying bar none, performance is paramount with the queries to be retured off this view/table query. To that...
6
1816
by: Matik | last post by:
Hello all, I've following problem. Please forgive me not posting script, but I think it won't help anyway. I've a table, which is quite big (over 5 milions records). Now, this table contains...
10
5586
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
8
8082
by: Klemens | last post by:
The linked table has a bigint in primary key columns. I've read that service pack 8 on Jet should solve this but it didn't. On patch1 options I only found to map timestamp to char(26) entry for...
33
4239
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
9
2984
by: AnandaSim | last post by:
Hi All, I've had Access 97, 2000 connections to the corporate Oracle database for a few years now - but seldom use it. When I did use it years ago, performance was not fast but the features were...
3
4831
by: Shestine | last post by:
I am trying to add a column to a current table, with data in it. I am only learning, and i have no idea how to change this to make it work. Here is the script I have right now it, but what it does is...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.