Optimized Binding (Newbie Question)

P

Paul

I will be creating multiple forms where the controls will bind to
fields from a table that is quite large. I can get it to work by
filling a dataset with the statement:

SELECT * FROM table-name

But the performance is not too good and I don't necessarily want to
fill the dataset with the entire table. The user will need to move to
previous and next records, be able to add, edit and delete records.

What is the best way to do this?
 
C

Cor Ligthert [MVP]

Paul,

It has not to do much with binding, more with concurrency, performance, etc.

In my opinion is one of the best way to create some comboboxes filled with
some seperated datatables that you have created using "distinct" in your
select statement.

If the index changes from those comboboxes you can read a dataset with a
where dependend on the displaymember from that combobox.

Than the rest should be quiet normal. Don't forget to (renew) again the
comboboxes if you have done an update or whatever.

However, there are many other ways to go.

I hope this helps,

Cor
 
M

m.posseth

Hello Paul ,

first rule in presenting data is filtering ! ,,,,, I am myself a automotive
catalogue programmer , we have thousands of articles in our catalogue , but
who wants to scroll through thousands of records ?

so you need to ask yourself what do i want to present ? , then create some
filters to come to this presentation so your sql would become SELECT *
FROM table-name WHERE x='bla' AND y=1;

if you really need to select this hole table then use data paging , with
data paging you can specify page sizes and present these to the user page by
page

also note that if you start filtering data a good indexing strategy is
necessary

By the way :

if you need to use DISTINCT in a SQL query then someone didn`t do his
homework good enough , in my eyes this is only needed with a poor database
design ( inconsistent data )

regards

Michel Posseth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top