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

Update an Access DB using VB.Net

I need to update 4 fields of a 20-field table. The table has no primary key.
I need to cycle thru each of the four fields for each record to manipulate
the data before writing it to the DB. In VB6, we used recordsets which were
always connected to the DB, but for some strange reason, MS decided to
implement unattached data objects (DataAdapter & DataSet).

So how can I update my table above?

--
|
+-- Julian
|

Mar 28 '06 #1
5 1818
Hi,
...but for some strange reason, MS decided to
implement unattached data objects (DataAdapter & DataSet).


IMO, this disconnected architecture is one of the best things about
ADO.NET, and it's where it scores highly over traditional ADO.

Calling your DataAdapter.Update() method will update the data from the
Dataset to the Database.

HTH,

Regards,

Cerebrus.

Mar 28 '06 #2
Julian,

I am curious, are you real not able to see the reason from this, beside the
technical problems there are with to many users on a disconnected
databaseserver.
but for some strange reason, MS decided to implement unattached data
objects (DataAdapter & DataSet).


Cor
Mar 28 '06 #3


"Cor Ligthert [MVP]" wrote:
Julian,

I am curious, are you real not able to see the reason from this, beside the
technical problems there are with to many users on a disconnected
databaseserver.
but for some strange reason, MS decided to implement unattached data
objects (DataAdapter & DataSet).


Cor


I know I cannot see the reason behind this.

Maybe it makes since if you are dealing with server apps. But in my case, I
write mainly pc apps where the database resides on the pc. In VB6 we just
used the recordset to add, update and delete. It was straight to the point.

George
Mar 28 '06 #4
George,

In a single user situation it is not important if you are connected or not
connected. In some cases will the use of pessimistic concurrency work easier
than optimistic concurrency. This is direct connected to the fact if you are
online. Pessimistic concurrency in a disconnected situatie will need a lot
of extra database programming or will give deadlocks.

Just my thouhgt,

Cor

"George" <Ge****@discussions.microsoft.com> schreef in bericht
news:58**********************************@microsof t.com...


"Cor Ligthert [MVP]" wrote:
Julian,

I am curious, are you real not able to see the reason from this, beside
the
technical problems there are with to many users on a disconnected
databaseserver.
> but for some strange reason, MS decided to implement unattached data
> objects (DataAdapter & DataSet).


Cor


I know I cannot see the reason behind this.

Maybe it makes since if you are dealing with server apps. But in my case,
I
write mainly pc apps where the database resides on the pc. In VB6 we just
used the recordset to add, update and delete. It was straight to the
point.

George

Mar 29 '06 #5
Hi George,

Databases are at their best, when they can service more and more
clients. A single-client database isn't what is used in most
corporations these days, not would it be practical.

It's perfectly cool that you need to write only single-user apps, but I
think you would acknowledge that this is not a common scenario.
Therefore Microsoft's shift towards a disconnected database access has
greatly enhanced the potential of various Client-Server applications.

Previous versions of ADO provided continuously connected data by
default, and the connection was kept open till the data was required,
or for the entire life of the application. When such databases serve
more and more clients, there was a definite decrease in the Performance
of the application, and consequently in the potential scalability.

The advantage with ADO.NET is that the connection is left open only
long enough to execute the appropriate command (SELECT, UPDATE or
whatever). So, connections are kept open for the minimum possible time,
and least system resources are used.

Try as I might, I can't find a fault with that !

Regards,

Cerebrus.

Mar 29 '06 #6

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

Similar topics

12
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL...
2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
3
by: Ken Bush | last post by:
How can I write an update query that removes part of a field? Like if I have a field with values such as 8/3/68 (a birthday obviously) and I need to put values in a new column but I need...
7
by: gthompson | last post by:
Is this possible: Read fields(rows/columns) from one sql database table (TableA). Then edit/update the same 'field' in TableA; and in TableB edit/update a different field - all at the same time?...
6
by: Matt | last post by:
I'm having difficulty with trying to update a Access memo field through an SQL statement where the value I'm trying to pass is longer than 255 characters. The field is being truncated. I'm using...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
4
by: George | last post by:
Hi all, I am having trouble with updating my data in an Access database. here is my code: Imports System.Data.OleDb Dim AppPath As String = Mid(Application.ExecutablePath, 1,...
11
by: John | last post by:
Hi I had a working vs 2003 application with access backend. I added a couple fields in a table in access db and then to allow user to have access to these fields via app I did the following; ...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.