PC Review


Reply
Thread Tools Rate Thread

DB app design suggestion

 
 
John
Guest
Posts: n/a
 
      12th Nov 2008
Hi

I created a drag and drop winform app in vs2008 from a single table of an
access database. I added additional queries to the data adapter in data set
designer. Two of them are for moving to next and previous records as below;

FillNext/GetDatNext

SELECT TOP 1 <field list>
FROM MyTable
WHERE (ID > ?)
ORDER BY ID


FellPrev/GetDatPrev

SELECT TOP 1 <field list>
FROM MyTable
WHERE (ID < ?)
ORDER BY ID DESC

The two commands are executed via Me.MyTableAdapter.FillPrev and
Me.MyTableAdapter.FillNext commands operated by Move Next and Move Prev
buttons on the form.

I have two questions;

1. Is this the correct approach to return only one record at a time?

2. When I press the Move Next button i.e. FillNext/GetDatNext command is
executed the record takes a couple of seconds to be returned and displayed
in the bound controls. Why is returning a single record taking so long? The
Move Prev on the other hand is fast presumably because record is already
somewhere in the buffer?

Any tips for improvements will be much appreciated.

Many Thanks

Regards



 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      12th Nov 2008
PS: The two commands are passed the id of the current record as parameter so
they can return the next or previous record from the one that is currently
displayed.

"John" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi
>
> I created a drag and drop winform app in vs2008 from a single table of an
> access database. I added additional queries to the data adapter in data
> set designer. Two of them are for moving to next and previous records as
> below;
>
> FillNext/GetDatNext
>
> SELECT TOP 1 <field list>
> FROM MyTable
> WHERE (ID > ?)
> ORDER BY ID
>
>
> FellPrev/GetDatPrev
>
> SELECT TOP 1 <field list>
> FROM MyTable
> WHERE (ID < ?)
> ORDER BY ID DESC
>
> The two commands are executed via Me.MyTableAdapter.FillPrev and
> Me.MyTableAdapter.FillNext commands operated by Move Next and Move Prev
> buttons on the form.
>
> I have two questions;
>
> 1. Is this the correct approach to return only one record at a time?
>
> 2. When I press the Move Next button i.e. FillNext/GetDatNext command is
> executed the record takes a couple of seconds to be returned and displayed
> in the bound controls. Why is returning a single record taking so long?
> The Move Prev on the other hand is fast presumably because record is
> already somewhere in the buffer?
>
> Any tips for improvements will be much appreciated.
>
> Many Thanks
>
> Regards
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DB app design suggestion John Microsoft ADO .NET 1 12th Nov 2008 09:17 PM
DB app design suggestion John Microsoft VB .NET 1 12th Nov 2008 09:17 PM
Looking for a design suggestion... pfm721 Microsoft Access Database Table Design 7 3rd Jul 2008 10:16 PM
Asp.Net Design suggestion =?Utf-8?B?UmFta3M=?= Microsoft ASP .NET 0 3rd Nov 2004 11:16 AM
Need a design suggestion BobV Microsoft Access Database Table Design 5 30th Jul 2004 06:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 AM.