473,738 Members | 3,636 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1702
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.tab les("firsttable "))
this 3 times from 1 to 3

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

and then
swLoad = true

in the selectedindexch angeevent from the combobox1 (and combobox2)
\\\
if swLoad = true then
dv2.rowfilter = "myfield = '" & combobox1.selec tedvalue.tostri ng & "'"
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
2131
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 or something that completely abstracts you from the persistence details. Are you: 1. Having simple data type interfaces and the data layer know nothing about the domain models. For example: public int SaveCustomer( string fname, string...
7
3036
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 to tell which items were in the first set missing from the second set and which items were added to the second set. Can anyone recommend an algorithm for this, or a collection class in C# that may be of help? My first inclination is the take...
5
2790
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 to the database to get the next page. Is there a way to use the dataset to allow us to read back and forth in it instead of going back to the database to get it? Thanks,
1
3228
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 given me proper access to the temporary directory c:/Windows/Microsoft.NET/Framework/V1.1.4322/Temporary ASP.NET Files/root/...." I believe it also demonstrates that I have access to c:/documents and settings/xyz/aspnet/local settings/ ...
6
277
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 a public variable or a property? since a property only retrieves By value, and not by reference, when you send a data set in does it make a copy of it for that object? or just pass a reference similar to what an array would do in C++. What i need...
0
1196
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 "DataTable.Columns(i).ColumnMapping = MappingType.Hidden" to hide columns which should be hidden). So, the code I use every time to fill DataTable and display data in DataGrid looks like: Private Sub xxxxx(...) Dim firstTime as Boolean = true
5
2299
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 to 15 times a day the server hangs and times out when this fill method is called. The SP is simple and uses very little resources (as tested using client statistics in query analyzer). Here's data from my error log which includes the...
6
2696
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 test-driven development, writing tests and then coding to satisfy them, I'll start with some of the simple tests for a class.
2
4208
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 causing the error... Thanks!!! Server Error in '/' Application. ---------------------------------------------------------------------------­----- Multiple-step OLE DB operation generated errors. Check each OLE DB
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.