473,473 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

when update database, i must wait few second!

hi
i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET 2.0.
i'm using Dataset to (insert,update,delete) and in get data i use
(Datareader), but my problem when i do this:
1 - insert data (by dataset).
2- get data (by datareader).
when i run this commands i can't get latest data from database, i get data
before insert!!!
but after few second i can get real data after insert, is this problem from
Dataset or Datareader or from Access Database?

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com
Oct 1 '07 #1
6 2016
Hi,

Post your code, your post is not very clear to just give you a solution
based on it.

"Tark Siala" <ta*******@icc-libya.comwrote in message
news:Oc**************@TK2MSFTNGP04.phx.gbl...
hi
i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET
2.0.
i'm using Dataset to (insert,update,delete) and in get data i use
(Datareader), but my problem when i do this:
1 - insert data (by dataset).
2- get data (by datareader).
when i run this commands i can't get latest data from database, i get data
before insert!!!
but after few second i can get real data after insert, is this problem
from Dataset or Datareader or from Access Database?

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com


Oct 1 '07 #2
I expect that this is by design. By default JET caches all
updates/deletes/inserts in memory until it has time (idle time) to post the
changes to the database. This improves update performance but means that
data is held in local memory (and only in local memory) for some time. IIRC
you can wrap the operation(s) in a Transaction to get JET to write
immediately on Commit.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Tark Siala" <ta*******@icc-libya.comwrote in message
news:Oc**************@TK2MSFTNGP04.phx.gbl...
hi
i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET
2.0.
i'm using Dataset to (insert,update,delete) and in get data i use
(Datareader), but my problem when i do this:
1 - insert data (by dataset).
2- get data (by datareader).
when i run this commands i can't get latest data from database, i get data
before insert!!!
but after few second i can get real data after insert, is this problem
from Dataset or Datareader or from Access Database?

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com

Oct 1 '07 #3
Tark,

I am very curious why you use the datareader instead of a dataadapter to
fill your datatable.

You are payed by row or something?

Cor

Oct 2 '07 #4
Cor, I suggest you leave the comedy to the professionals... ;)

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:C6**********************************@microsof t.com...
Tark,

I am very curious why you use the datareader instead of a dataadapter to
fill your datatable.

You are payed by row or something?

Cor
Oct 2 '07 #5
Bill,
Cor, I suggest you leave the comedy to the professionals... ;)
I had to think about this, but what is the comedy in this, I am just
curious?

I don't understand why people want to use methods, where strongly typing is
not even possible, while there are so nice methods available.

My only gues was that it is to create more lines.

Cor

Oct 4 '07 #6
thank's.
now i write this lines and its working good:

1 - Fill Dataadapter from Database.
2 - Fill Dataset from Dataadapter.
3 - Update Dataset.
4 - Update Dataadapter from Dataset (to update database).
5 - Fill Dataset from Dataadapter (again to get latest data changes).

Now i get latest data changes.

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com

"William Vaughn" <bi**********@betav.comwrote in message
news:Oq**************@TK2MSFTNGP02.phx.gbl...
>I expect that this is by design. By default JET caches all
updates/deletes/inserts in memory until it has time (idle time) to post the
changes to the database. This improves update performance but means that
data is held in local memory (and only in local memory) for some time. IIRC
you can wrap the operation(s) in a Transaction to get JET to write
immediately on Commit.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

"Tark Siala" <ta*******@icc-libya.comwrote in message
news:Oc**************@TK2MSFTNGP04.phx.gbl...
>hi
i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET
2.0.
i'm using Dataset to (insert,update,delete) and in get data i use
(Datareader), but my problem when i do this:
1 - insert data (by dataset).
2- get data (by datareader).
when i run this commands i can't get latest data from database, i get
data before insert!!!
but after few second i can get real data after insert, is this problem
from Dataset or Datareader or from Access Database?

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com



Oct 6 '07 #7

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

Similar topics

12
by: Andrew Baker | last post by:
What is the best way to lock an individual row in the following scenerio: --TODO - LOCK THIS ROW -- Return the next id SELECT next_id INTO next_id_out FROM owner.my_id_table WHERE app_id =...
3
by: Ray | last post by:
I am having my first experience using BLOB as a row in a table. I am using it to insert graphics for labels we print. I have no problem inserting into and select from the table. The graphic is...
1
by: cguillot | last post by:
Hello, I have a web page that displays information from a SQL database and this information can change frequently. Basically, a database entry is made into a table every time a person enters or...
4
by: Lada 'Ray' Lostak | last post by:
Hello there, I am thinking how to solve another typical problem of online systems with combination of thin client... Imagine simple case, 2 users are going to edit 'same' datas. Both see on the...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
2
by: shenanwei | last post by:
DB2 V8.2 on AIX, type II index is created. I see this from deadlock event monitor. 5) Deadlocked Connection ... Participant no.: 2 Lock wait start time: 09/18/2006 23:04:09.911774 .........
0
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
8
by: Boris227 | last post by:
I have written an application that has a DataGridView for users to amend a table. When finished they click a 'Save' button, which generates a series of queries based on the new data. The problem...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
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...
1
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
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
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...

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.