472,789 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 software developers and data experts.

Fill 3 data sets at one time or copy one dataset to another

Sorry for weird title and sorry for my English (I'm from Poland).

This is the problem:
I have form with many controls.
There are three comboboxes - each should have table STREETS as DataSource.

1) If I connect each combobox to one Dataset then if I choose street in one
combobox it changes also in combobox 2 and 3.
So one dataset to three comboboxes is bad idea, isn't it?
But filling one dataset is fast.

2) So I changed it. Now I have 3 datasets and 3 comboboxes - if I change
street in one then it doesn't change anything in rest of boxes.
Great! But when i open form then filling three dataset with the same values
takes too much time.
Because it is copying table STREETS from MSSQL Database to one dataset, then
to second and...to third dataset.

QUESTION:
A) Did I do something wrong? - I'm sure I did because I'm rookie (amateur).
B) Is it possible to copy STREETS from 1 dataset to dataset 2 and 3 - and
does it take much time?
C) Maybe it is possible to fill one dataset only and connect it to three
comboboxes and each combox is independent from other...

I HOPE somebody has understood me and I BEG you for answer.
THANX from Poland.

Nov 21 '05 #1
6 1645
Chreo,

I hope the wether is good in Kiew, :-)

What you do can be a very fine method. However use dataviews.

You can than set when the combobox1 changes the datarowfilter for the dataview from combobox1
and that as well for combobox2 with dataview from combobox1

Jak chcesz wiecej informacji, napisz, ale po angielsku.

Cor

Nov 21 '05 #2
You can than set when the combobox1 changes the datarowfilter for the
dataview from combobox1
and that as well for combobox2 with dataview from combobox3

Nov 21 '05 #3
I haven't use DATAVIEW yet but thanx I will try that as soon as I teach how
to make dataview :)

By the way - capital of Poland is Warsaw and I hope that was joke with
"Kiev" :)
Nov 21 '05 #4
Chreo.

I thought the capital from Poland was Chicago, do you think that somebody
who gives you an answer in Polish does not know the capital from Poland.
However I had success with that.

To show you how you can by instance do it.

In top of your program
dim swLoad as boolean

than where you have filled your datasets

dim dv1 as new dataview(ds.tables("firsttable"))
this 3 times from 1 to 3

combobox1.datasource = dv1
the rest the same as it was
however as well 3 times

and then
swLoad = true

in the selectedindexchangeevent from the combobox1 (and combobox2)
\\\
if swLoad = true then
dv2.rowfilter = "myfield = '" & combobox1.selectedvalue.tostring & "'"
end if
///

I hope this helps,

Cor
Nov 21 '05 #5
Yeah!
It loads about 40% faster.
It was 15sec earlier and now is 8-10sec... :)

Now I must find out what to do to not load each dataset every time I refresh
the form.

for example:
I am adding new costumers and when I save one costumer then the form opens
again to add another costumer.
What to do to only update rows in dataset which were not in that datasets
earlier.
(for example there was dataset with NAMES and I added new NAME when 1st
costumer was saved,
now I want only update dataset with this one NAME and not all table NAMES
again)
Nov 21 '05 #6
Anyone can help me with speeding my form?
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Kevin C | last post by:
I was curious to know what some developers out in the industry are doing when it comes to exposing Data access logic, specifically persistence. This is assuming that your not using an O/R framework...
7
by: Terry | last post by:
I've got a situation where I have a set of data, and later take another snapshot to obtain a second set of data. There will be one or more changes in the second set of data and I need to be able...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
1
by: Siegfried Heintze | last post by:
I'm using a third party hosting service. I presently have a Web Service on this hosting service's server that loads and executes a native mode DLL. This demonstrates that the hosting service has...
6
by: Brian Henry | last post by:
What is the best way to pass a data set between objects? I have a custom control which will depend on a dataset (kind of like a bound contorl, but im handleing it differently) is it best to pass as...
0
by: Marcin Podle¶ny | last post by:
Hello! I use DataGrid which displays data in several columns. Number of columns depends on user prefferences (I mean: this is still the same query filling datatable but I use...
5
by: moondaddy | last post by:
I have a website where cataloge pages are populated by calling a stored procedure on sql server. I use the sql data adapter's fill method to call this stored procedure and fill the dataset. about...
6
by: Ben Finney | last post by:
Howdy all, Summary: I'm looking for idioms in unit tests for factoring out repetitive iteration over test data. I explain my current practice, and why it's unsatisfactory. When following...
2
by: slinky | last post by:
I'm getting a error when I open my . aspx in my browser... line 34: da.Fill(ds, "Assets") Here's the error and my entire code for this .aspx.vb is below that ... I need some clues as to what is...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.