473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using an INSERT Query as the value for the UpdateCommand property

I want to use an INSERT Query as the value for the UpdateCommand property of
an SQL datasource, anyone know if this will actually work ?

The reason i want to do it is bacause i am taking values from tablea and
binding them to controls, whose values i want to insert into tableb. I am
using a detailsview control to do the databinding. If the detailsview is in
edit mode then it displays the data from table A in the bound testbox
controls in the templatefield but obviously they are blank in insert mode.
However i want the textbox values to default to the values from table A when
they are to be inserted into table B. I thought the easiest way to do this
without having to programatically assign Test property of 30+ text boxes
everytime the detailsview changed into insert mode, was to use edit mode
instead but run an insert query rather than an update query. Will this work,
or is there a much better way of doing it?
Apr 5 '06 #1
0 1269

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

Similar topics

2
by: avinash | last post by:
hello myself avinash i am developing on application having vb 6 as front end and sql server 7 as back end. when i use insert query to insert data in table then the date value of that query is...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
0
by: Daves | last post by:
(using 2.0) I have a page for viewing products and each product is assigned to several categories. On this page I have a FormView and an AccessDataSource. The ItemTemplate shows the product...
5
by: Annie | last post by:
hello guys, I have little experience working with C# and MS Access ... I am having an insert query with one datetime field and a boolean and couple of text and number fields as below: ...
1
by: =?Utf-8?B?RGV2YW4=?= | last post by:
Hi, I have a table adapter for a database with an insert query. I want to be able to get the PRIMARY key of the inserted record for that insert statement. I know that SCOPE_IDENTITY is the...
1
by: hnpatel | last post by:
Hi to all, How to use insert query in php? I m using ODBC connection with access database.I want to save data in table. I m using database 'PHPDB1'. Table Name 'EDETAIL'. There r...
1
by: billa856 | last post by:
Hi, I am trying to insert Null value in column(ShipDate) in my table.That column(ShipDate)'s type id date/time and format is short date. I am using "" to insert Null in that column(ShipDate)...
3
by: mzmishra | last post by:
Hi, This is first time I am using Nhibernet. This is how I have defined my xml file <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"...
2
bard777
by: bard777 | last post by:
I have a form kicking off an INSERT query. I need to check another table for a matching value and use a field from that table as the value for one of the fields in my insert. Table 1 (insert from...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
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,...
0
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...

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.