473,378 Members | 1,393 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,378 software developers and data experts.

Q: Updating

Hi

This question has just occurred to me and I'm hoping somebody can help me.

Suppose I have a table in an Access database. I have access to this table
via a data adaptor i.e. I create a data adaptor to the table, create the
update, delete etc. commands using a command builder and then fill a dataset
with the table.

My question is, if I add a column to the tables in the dataset, and then do
an update, will the new column appear in the source table in the Access
database?

The reason I'm uncertain as to whether it would happen is because the
update, insert, delete etc. commands are generated before the new column has
been created. If this is the case, how can the table be updated with the new
column?

Hope somebody can clarify things for me?

Geoff
Nov 21 '05 #1
6 1031
Geoff,

AFAIK uses the commandbuilder the columns it gets from the select.

Therefore only those columns will be updated.

There will never been build a table in your database by a adonet command by
the way, with the exception of an execute.nonquiry supplying a SQL Create or
Alter statement.

I hope this helps,

Cor

"Geoff" <no********@email.com> schreef in bericht
news:43**********************@news.dial.pipex.com. ..
Hi

This question has just occurred to me and I'm hoping somebody can help me.

Suppose I have a table in an Access database. I have access to this table
via a data adaptor i.e. I create a data adaptor to the table, create the
update, delete etc. commands using a command builder and then fill a
dataset with the table.

My question is, if I add a column to the tables in the dataset, and then
do an update, will the new column appear in the source table in the Access
database?

The reason I'm uncertain as to whether it would happen is because the
update, insert, delete etc. commands are generated before the new column
has been created. If this is the case, how can the table be updated with
the new column?

Hope somebody can clarify things for me?

Geoff

Nov 21 '05 #2
Hi Cor

Do I understand you correctly i.e. there is now way to create a new column
in a table in a database via an update command to a data adaptor (by adding
a column to a table of a dataset and then doing the update)?

Geoff

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
Geoff,

AFAIK uses the commandbuilder the columns it gets from the select.

Therefore only those columns will be updated.

There will never been build a table in your database by a adonet command
by the way, with the exception of an execute.nonquiry supplying a SQL
Create or Alter statement.

I hope this helps,

Cor

"Geoff" <no********@email.com> schreef in bericht
news:43**********************@news.dial.pipex.com. ..
Hi

This question has just occurred to me and I'm hoping somebody can help
me.

Suppose I have a table in an Access database. I have access to this table
via a data adaptor i.e. I create a data adaptor to the table, create the
update, delete etc. commands using a command builder and then fill a
dataset with the table.

My question is, if I add a column to the tables in the dataset, and then
do an update, will the new column appear in the source table in the
Access database?

The reason I'm uncertain as to whether it would happen is because the
update, insert, delete etc. commands are generated before the new column
has been created. If this is the case, how can the table be updated with
the new column?

Hope somebody can clarify things for me?

Geoff


Nov 21 '05 #3
Geoff,

No however doing it with SQL code is absolute no hell of a job using the
Alter Table Sql code.

http://msdn.microsoft.com/library/de...aa-az_3ied.asp

And than process this with executenonquery.

\\\
dim conn as new sqlconnections(connectionstring)
dim cmd as new sqlcommand(sqlstring, conn)
open.conn
cmd.executenonquery
close.conn
///

I hope this helps,

Cor
"Geoff" <no********@email.com> schreef in bericht
news:43***********************@news.dial.pipex.com ...
Hi Cor

Do I understand you correctly i.e. there is now way to create a new column
in a table in a database via an update command to a data adaptor (by
adding a column to a table of a dataset and then doing the update)?

Geoff

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
Geoff,

AFAIK uses the commandbuilder the columns it gets from the select.

Therefore only those columns will be updated.

There will never been build a table in your database by a adonet command
by the way, with the exception of an execute.nonquiry supplying a SQL
Create or Alter statement.

I hope this helps,

Cor

"Geoff" <no********@email.com> schreef in bericht
news:43**********************@news.dial.pipex.com. ..
Hi

This question has just occurred to me and I'm hoping somebody can help
me.

Suppose I have a table in an Access database. I have access to this
table via a data adaptor i.e. I create a data adaptor to the table,
create the update, delete etc. commands using a command builder and then
fill a dataset with the table.

My question is, if I add a column to the tables in the dataset, and then
do an update, will the new column appear in the source table in the
Access database?

The reason I'm uncertain as to whether it would happen is because the
update, insert, delete etc. commands are generated before the new column
has been created. If this is the case, how can the table be updated with
the new column?

Hope somebody can clarify things for me?

Geoff



Nov 21 '05 #4
Hi Cor

Very interesting as usual. Thanks. However, this spurs me on to another,
related question:

Suppose you have two tables; not necessarily with the same fields. You can
load these tables into a dataset quite easily. You can even Merge the two
tables together, However, it appears that after merging the tables you
cannot upload the resulting table "back" to one of the original tables.

Is this correct?

Geoff

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
Geoff,

No however doing it with SQL code is absolute no hell of a job using the
Alter Table Sql code.

http://msdn.microsoft.com/library/de...aa-az_3ied.asp

And than process this with executenonquery.

\\\
dim conn as new sqlconnections(connectionstring)
dim cmd as new sqlcommand(sqlstring, conn)
open.conn
cmd.executenonquery
close.conn
///

I hope this helps,

Cor
"Geoff" <no********@email.com> schreef in bericht
news:43***********************@news.dial.pipex.com ...
Hi Cor

Do I understand you correctly i.e. there is now way to create a new
column in a table in a database via an update command to a data adaptor
(by adding a column to a table of a dataset and then doing the update)?

Geoff

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
Geoff,

AFAIK uses the commandbuilder the columns it gets from the select.

Therefore only those columns will be updated.

There will never been build a table in your database by a adonet command
by the way, with the exception of an execute.nonquiry supplying a SQL
Create or Alter statement.

I hope this helps,

Cor

"Geoff" <no********@email.com> schreef in bericht
news:43**********************@news.dial.pipex.com. ..
Hi

This question has just occurred to me and I'm hoping somebody can help
me.

Suppose I have a table in an Access database. I have access to this
table via a data adaptor i.e. I create a data adaptor to the table,
create the update, delete etc. commands using a command builder and
then fill a dataset with the table.

My question is, if I add a column to the tables in the dataset, and
then do an update, will the new column appear in the source table in
the Access database?

The reason I'm uncertain as to whether it would happen is because the
update, insert, delete etc. commands are generated before the new
column has been created. If this is the case, how can the table be
updated with the new column?

Hope somebody can clarify things for me?

Geoff



Nov 21 '05 #5
Geoff,

Suppose you have two tables; not necessarily with the same fields. You can
load these tables into a dataset quite easily. You can even Merge the two
tables together, However, it appears that after merging the tables you
cannot upload the resulting table "back" to one of the original tables.

Is this correct?

As long as that the columns are in the database table you can do everything
you want with the merged table as long that you create the right
DeleteCommand, InsertCommand and UpdateCommand in the DataAdapter.

http://msdn.microsoft.com/library/de...mberstopic.asp

I hope that this is what you mean?

Cor


Nov 21 '05 #6
Yes, thanks so much Cor.

Geoff

"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Geoff,

Suppose you have two tables; not necessarily with the same fields. You
can load these tables into a dataset quite easily. You can even Merge the
two tables together, However, it appears that after merging the tables
you cannot upload the resulting table "back" to one of the original
tables.

Is this correct?

As long as that the columns are in the database table you can do
everything you want with the merged table as long that you create the
right DeleteCommand, InsertCommand and UpdateCommand in the DataAdapter.

http://msdn.microsoft.com/library/de...mberstopic.asp

I hope that this is what you mean?

Cor

Nov 21 '05 #7

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

Similar topics

11
by: Jason | last post by:
Let's say I have an html form with 20 or 30 fields in it. The form submits the fields via POST to a php page which updates a table in a database with the $_POST vars. Which makes more sense? ...
2
by: Hal Vaughan | last post by:
First, I am aware of both SwingUtilities.invokeLater(), and of using Thread to create a new thread.  These are part of the problem. I want to have something running in the background, while the...
45
by: It's me | last post by:
I am new to the Python language. How do I do something like this: I know that a = 3 y = "a" print eval(y)
6
by: Hennie de Nooijer | last post by:
Hi, Currently we're a building a metadatadriven datawarehouse in SQL Server 2000. We're investigating the possibility of the updating tables with enormeous number of updates and insert and the...
0
by: cwbp17 | last post by:
Have two tables that have a FK relationship on ID column. Have one datagrid that displays all of the columns of both tables. What's the best approach on updating a row from the datagrid back to...
10
by: jaYPee | last post by:
does anyone experienced slowness when updating a dataset using AcceptChanges? when calling this code it takes many seconds to update the database SqlDataAdapter1.Update(DsStudentCourse1)...
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
6
by: muttu2244 | last post by:
hi all am updating the same file in ftp, through multiple clients, but am scared that two clients may open the same file at a time, and try updating, then the data updated by one data will be...
0
by: =?Utf-8?B?YmFrZXJzaGFjaw==?= | last post by:
Unless my app is EXTREMELY simple, I get the cross-threading error message regularly when updating controls on a Windows form. My latest example involves a dll that runs a System.Threading.Timer,...
5
by: rosaryshop | last post by:
I'm working a jewelry/rosary design web site at http://www.rosaryshop.com/rosariesAndKits2.php. As the user makes selections, it updates images of various parts, giving them a preview of the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.