Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataAdapter, DataView, DataTable?

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
0
0
I have a view, qryStorageLocationSelector which I need to use to populate a series of 4 listboxes.

The view has the following columns:
Level1ID, Level1, Level2ID, Level2, Level3ID, Level3, Level4ID, Level4, LocationID

Obviously, there can be multiple occurances of Level1,2,3,4 values etc. I want to select distinct values for each listbox (e.g. SELECT DISTINCT Level1, Level1ID for lst1).

Any suggestions as to what I need to use, as all of the above seem to not provide what I need?

James Goodman MCSE, MCDBA
 
you want to populate each listbox with the distinct values of the levels?

why not use 4 queries? one for each of the listboxes?

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Thats what I have done for now, although I dont like the need for server roundtrips that result. It works fine over our LAN connection, but users often connect remotely & it then slows the process considerably.

Any suggestions as to how I can avoid the server roundtrips?

James Goodman MCSE, MCDBA
 
what server round trips?

the server round trip occurs when a page is being requested by the browser (a postback occurs or a new url is entered in the browser).

you now are probably doing something like for the first checkbox selected value you populate the others and so on, right? and this is where the round-trip occurs

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Can't you use a DataSet? Within your dataset, you can hold multiple tables, one table for each dropdown. This would only be a single connection to the database, run all your queries, and then close the connection.
 
what server round trips?

Postbacks for each of the listboxes. At the moment, when the user selects an item in the listbox it posts this back to the server to populate the next listbox. As I said, it works perfectly, & were it a regular windows app it would be great. However, because it will be accessed remotely it seems to un-necessarily slow the page down.

James Goodman MCSE, MCDBA
 
where did you specify that the listboxes are being populated depending on one another?

anyway. to bypass the server round trips you need to use javascript (a client side scripting language). your best bet would be to create multidimensional arrays in javascript and use them to populate the values of the textboxes upon their OnChange event (at client side)

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
anyway. to bypass the server round trips you need to use javascript (a client side scripting language). your best bet would be to create multidimensional arrays in javascript and use them to populate the values of the textboxes upon their OnChange event (at client side)

Do you know of any examples?

James Goodman MCSE, MCDBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top