By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,844 Members | 1,895 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,844 IT Pros & Developers. It's quick & easy.

when update database, i must wait few second!

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.