[dba-VB] VB.Net - DoEvents

Shamil Salakhetdinov shamil at users.mns.ru
Fri Jul 13 10:10:28 CDT 2007


Hello John,

I have no clear idea why you do not get your WinForms controls updated if
you raise and process(sink) events to update these controls in the same
thread. Do you have one main (UI/WinForms) thread calling your long running
code bulk insert code or this bulk insert is executed in another worker
thread?

<<<
I continue to be amazed at how quickly you can do things in .Net
>>>
Yes, I agree, .NET 2.0 with VS2005 is the "dream come true"...

<<<
After hundreds of hours of hacking away I have yet to bind an object to data
>>>
John, have a look here:
http://brewder.blogspot.com/2007/03/data-binding-classes-interfaces-and.html


<<<
Once I get .NET ADO nailed I think things will start falling into place.  In
the meantime... Waaaaaaaaaa!
>>>
Yes! Waaaaaaaaaa! :) I'm also still far from getting very closely familiar
with this .NET Framework "behemoth"...

--
Shamil
 
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, July 13, 2007 5:11 PM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VB.Net - DoEvents

Shamil,

I am definitely looking at wrapping these processes in worker threads but I
need to get the code working first.  It turns out that if I run the code
full speed, the objects on the form do update, it is just when I step
through code that they do not.  I really don't understand why not at this
point.  I am using events raised in my class to pass status info to event
sinks on the form and it is all working, event sinking status events from
the SQLBulkCopy class and bubbling them up to the form.

I continue to be amazed at how quickly you can do things in .Net IF you
already know .Net and how large the learning curve is.  It is actually quite
easy to do little things even with no knowledge, it is just that I do not
think in "little things", I think in high level operations (top down kinda
sorta) and I do not understand all of the syntax required to put the big
pieces into place.  I know VBA and DAO like the back of my hand.  I am used
to just "whacking out code" and that ain't happening in VB.Net, which is
frustrating.  

One of my BIG BIG issues is my almost total lack of understanding of ADO,
made worse by the fact that .NET ADO is even more different.  Much of what I
currently need .Net for is data manipulation, NOT human data entry /
display.  Reading / writing tables > files and vv.  And of course most of
the books concentrate on human data entry / display with very little time
spent on how to do things directly in code.  It all seems to be "drag this
object out, set this property, bind it to this control", which is just
useless to me right now.  I need to create those objects in code, in the
correct order, set the properties in code, use the results in code.  After
hundreds of hours of hacking away I have yet to bind an object to data,
though I am finally beginning to need that for my own human interface to
these projects.

Once I get .NET ADO nailed I think things will start falling into place.  In
the meantime... Waaaaaaaaaa!

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Friday, July 13, 2007 8:48 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VB.Net - DoEvents

Hello John,

I think this information could help you to solve your task:

http://fernandof.wordpress.com/2007/04/04/implementing-multi-threading-in-wi
nforms-using-the-backgroundworker-class/

http://www.knowdotnet.com/articles/backgroundworker.html


--
Shamil
 
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, July 13, 2007 2:28 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net - DoEvents

I am running a process with a form which sinks events form a class and
updates controls on the form in those events.  I put DoEvents as the last
line in the event sinks but the form is not refreshing, at least not while
stepping through the code.  Is there something else I need to do to cause
the form to refresh?

John W. Colby
Colby Consulting
www.ColbyConsulting.com 


_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list