Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > good programming practise - controls and DBs


Reply
 
Thread Tools Display Modes
  #1  
Old 12-06-2002, 03:48 AM
zann
Guest
 
Posts: n/a
Exclamation good programming practise - controls and DBs


Hi

I have a small problem with the application I am busy with.I have and
msflexgrid and before the form exists it saves the selected row to the DB
using an update statement, this db entry is used in the next form and is
requested using a select statement. My problem is that sometimes the update
takes longer than the other form loading and selectinmg the Db entry
therefore it doesnt get selected. I need some advice on which controls to
use to ensure that the appropriate time is taken to let the update statement
take place and therefore the correct info selected. Should I make use of a
different mouse cursor? or should i make a small form with a progress bar on
it? But what I am trying to get my head around is the following: how do I
know when the statement is completely updated?is there anyway of determining
from the DB when it is complete? I am using and access database and
ADO.Another factor is also when the db increases will it affect the
update/insert time??

thanx in advance!

zann

Reply With Quote
  #2  
Old 12-06-2002, 04:53 AM
Shurik12 Shurik12 is offline
Steppe Walker

Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

Hi zann,

Have not you tried DoEvents statement to insure that?

Regards,
Shurik12.
__________________
"A diaper is not like a computer that makes satisfying burbling noises from time to time, hinting at great inner complexity." Malcolm Gladwell

"I'm sitting here completely surrounded by no beer." Onslow, 'Keeping up appearances'
Reply With Quote
  #3  
Old 12-06-2002, 04:54 AM
anhmytran anhmytran is offline
Senior Contributor

Retired Moderator
* Guru *
 
Join Date: Aug 1999
Location: Hartford, Connecticut, 06
Posts: 1,487
Default

1- When the db becomes huge, of course, performance worsen.
I don't think there is any better practice than compacting often.

2- I think there is a property value when a record is changed.
However, this helps only when the application works with only
one single record or batch of records. There is no way to check
for the completeness of a command. Please, do not take my
word for that. I am eager to see anyone offering better ideas.
Reply With Quote
  #4  
Old 12-06-2002, 05:52 AM
zann
Guest
 
Posts: n/a
Default

No, I actually have never heard of it. Is it possible for you to give me a peice of example code so that i can see how it works and I can understand it. Thanx a million I really appreciate it!
Reply With Quote
  #5  
Old 12-06-2002, 06:56 AM
anhmytran anhmytran is offline
Senior Contributor

Retired Moderator
* Guru *
 
Join Date: Aug 1999
Location: Hartford, Connecticut, 06
Posts: 1,487
Default

Code:
This is in the General section:
    Dim RecSet As ADODB.Recordset

Please, place it in Timer or event that checks time periodically:
    If any of these:
    RecSet.State = adStateOpen
    RecSet.State = adStateClosed
    RecSet.State = adStateConnecting
    RecSet.State = adStateExecuting
    RecSet.State = adStateFetching
    Then give user a feedback.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->