I update data in a database via the datagrid, bound to a ADO control. The problem is the update takes about 3 seconds before my query reflects it !! Does anybody know how I can speed this up or force the control to commit the data immediately?
Printable View
I update data in a database via the datagrid, bound to a ADO control. The problem is the update takes about 3 seconds before my query reflects it !! Does anybody know how I can speed this up or force the control to commit the data immediately?
If you use BeginTrans and CommitTrans at connection level, your changes should be reflected immediatley
eg: -
Code:cnn.BeginTrans
cnn.Execute "UPDATE/INSERT/DELETE or something..."
cnn.CommitTrans
I Don't use any source code to update the database. This is done automatically by the control. I've seen the committrans command before, but I can't find it in the properties. I'm using Microsoft ADO 6.0 and Microsoft DataGrid 6.0
Thanx Jimbob.
I can't see that there's much of way around that, unfortunatley. Data controls have always been pretty slow - i think that's the trade off for them being so handy.
you might want to look into DataEnvironments instead - they're just as easy to use but are more flexible. I think they are probably faster, too.theres a good article about them here ->http://www.vb-world.net/articles/dbtutorial6/ if you've not come across them before.
I know this is not much help, as it'll mean loads more work, but unfortunatley I can't think of any other solutions at the moment. If something comes to me i'll let you know