Hi,
I've been struggling subqueries/joins and table adapters for some time and
can't find a clear answer.
I have a stored procedure that returns columns from 2 tables. Two columns
from the second table are returned by subquery. All this is done in a
stored procedure.
I also have a stored procedure that takes most of the params from the select
proc and updates both tables.
The problem is that columns from the second table (i.e. from a subquery)
seem to be read-only in the auto-generated table adapter.
I'm stuck and don't really know how to proceed. It seems like an extremely
simple thing to do outside of asp.net. Unfortunately I'm relatively new to
asp.net and not quite sure how to deal with it.
So, how do I pass parameters to the stored procedure that updates both
tables?
I'd appreciate _any_ suggestions.
Thanks,
Bogdan 3 1715
As a general rule you should not be updating queries that are results of
Join operation...
Instead issue UPDATE command yourself...
Actually that is how it works behind the scene anyway.
George.
"Bogdan" <Bo****@company .comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hi,
I've been struggling subqueries/joins and table adapters for some time and
can't find a clear answer.
I have a stored procedure that returns columns from 2 tables. Two columns
from the second table are returned by subquery. All this is done in a
stored procedure.
I also have a stored procedure that takes most of the params from the
select proc and updates both tables.
The problem is that columns from the second table (i.e. from a subquery)
seem to be read-only in the auto-generated table adapter.
I'm stuck and don't really know how to proceed. It seems like an
extremely simple thing to do outside of asp.net. Unfortunately I'm
relatively new to asp.net and not quite sure how to deal with it.
So, how do I pass parameters to the stored procedure that updates both
tables?
I'd appreciate _any_ suggestions.
Thanks,
Bogdan
Thanks for the reply. Could you please explain what you meant by "issue
UPDATE command yourself..."?
Thanks,
Bogdan
"George Ter-Saakov" <gt****@cardone .comwrote in message
news:Ob******** ******@TK2MSFTN GP05.phx.gbl...
As a general rule you should not be updating queries that are results of
Join operation...
Instead issue UPDATE command yourself...
Actually that is how it works behind the scene anyway.
George.
"Bogdan" <Bo****@company .comwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Hi,
I've been struggling subqueries/joins and table adapters for some time and can't find a clear answer.
I have a stored procedure that returns columns from 2 tables. Two columns from the second table are returned by subquery. All this is done in a stored procedure.
I also have a stored procedure that takes most of the params from the select proc and updates both tables.
The problem is that columns from the second table (i.e. from a subquery) seem to be read-only in the auto-generated table adapter.
I'm stuck and don't really know how to proceed. It seems like an extremely simple thing to do outside of asp.net. Unfortunately I'm relatively new to asp.net and not quite sure how to deal with it.
So, how do I pass parameters to the stored procedure that updates both tables?
I'd appreciate _any_ suggestions. Thanks, Bogdan
I mean if you need to update record in the database just do something like
(psedocode)
con.Execute("UP DATE table SET field1 = 10 WHERE id=5")
Something like that....
George.
"Bogdan" <Bo****@company .comwrote in message
news:O6******** ******@TK2MSFTN GP02.phx.gbl...
Thanks for the reply. Could you please explain what you meant by "issue
UPDATE command yourself..."?
Thanks,
Bogdan
"George Ter-Saakov" <gt****@cardone .comwrote in message
news:Ob******** ******@TK2MSFTN GP05.phx.gbl...
>As a general rule you should not be updating queries that are results of Join operation... Instead issue UPDATE command yourself...
Actually that is how it works behind the scene anyway.
George.
"Bogdan" <Bo****@company .comwrote in message news:%2******* *********@TK2MS FTNGP06.phx.gbl ...
>>Hi,
I've been struggling subqueries/joins and table adapters for some time and can't find a clear answer.
I have a stored procedure that returns columns from 2 tables. Two columns from the second table are returned by subquery. All this is done in a stored procedure.
I also have a stored procedure that takes most of the params from the select proc and updates both tables.
The problem is that columns from the second table (i.e. from a subquery) seem to be read-only in the auto-generated table adapter.
I'm stuck and don't really know how to proceed. It seems like an extremely simple thing to do outside of asp.net. Unfortunately I'm relatively new to asp.net and not quite sure how to deal with it.
So, how do I pass parameters to the stored procedure that updates both tables?
I'd appreciate _any_ suggestions. Thanks, Bogdan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: BStorm |
last post by:
If I have a DataTable with a multipart primary key and want to update a
column based upon a value for that key, what is the most efficient way to do
this?
For example, if I have an OrderDtl table with a primary key consisting of an
OrderNo and OrderDtl and wish to update the OrderAmt colum when I have
values for OrderNo and OrderDtl.
|
by: Danny |
last post by:
Is there any way to update a column in a clustered index without incurring
the cost of reordering.
Example:
Create table TableX (
Col1 int,
Col2 smalldatetime,
Col3 varchar(10))
go
create clustered indext ix_test on tableX (Col2, Col1)
|
by: Chad |
last post by:
Could any suggest to me a good way to programmatically identify which SPs
update a database column. I would like to create a cross reference for our
database.
|
by: seshu |
last post by:
Hi everybody
This is seshu i have a piece of code to insert data into a column by taking the data from another table and the query is like this
insert into table1 (table1.name) select table2.name from empdetails
now aditonal to this i want update table 2 whase tdate value is null
ie i wnat to update a column whose value is null
i wrote this code
update table2 set tdate='2007-01-17' where tdate='null'
|
by: ManjushaA |
last post by:
Hi,
In sqlserver 2000 , do we have option to update column (value) which is related more than two tables.
how to update a column by using 2 or 3 tables ?
Thanks and Regards,
Pratheeka.
| |
by: ak1dnar |
last post by:
There are two tables in my database
1. Table_A
2. Table_B
Structure for Table_A
A_ID - A_code(FK to B_ID)
1001 - Null
1002 - Null
1003 - Null
|
by: abinesh.agarwal |
last post by:
Hi ,
I want to update the column in a table based on the updation of the
other column in the same table, but not getting the desired result.
DDL:
CREATE TABLE .(
NULL,
|
by: rote |
last post by:
I have a project i created using TableAdapters(Datasets with .xsd) and
everything works well on my PC.
But when i create a websetup project and deploy it to another server.
I keep getting Error ObjectDatasource cannot find a non generic update
method
Whats the best way to deploy projects when using DataSets like
TableAdapters..
|
by: fionashaw |
last post by:
I am trying to fix an issue for a customer which requires us to update a column in a table with the value in the column concatenated (||) with the value in another row in the same table.
The table holds comments on data items, where the data is held in datasets. Each year a new dataset is created by copying the previous years dataset but there is a problem where some of the comments were not copied and new comments have been added and they...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |