472,363 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,363 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 1181

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

Similar topics

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...
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...
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...
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: ...
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...
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...
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)...
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"...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is 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.