473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Data Binding and Relationships

Hi everyone,

I am writing some C# code using Visual Studio 2003 Enterprise Architech to
allow addresses in a database, to be accessesd so that the data can be
validated. I have 4 basic tables on the SQL Server 2000 (with SP3a).

These tables are named Addresses, StreetsInTowns, Streets and Towns. The
Streets table has a Primary Key named StreetID and the Towns table has a
primary key TownID. Both tables has a column named Name for the Street Name
or Town Name, we have some other info but for this we can ignore.

The Addresses Table contains the things like the Building Number and
Building Name and has 2 columns named StreetID and TownID that are related to
The StreetID column of the Streets table and the TownID column of the Towns
table. In our last table StreetsInTowns we have a Primary key StreetTownID
and 2 columns named StreetID and TownID, StreetID is related to StreetID of
the Streets table and the TownID of the Towns table. This table is used to
tell us what Towns has what Streets or what Streets are in what Town, example
- we could have a High Street in Anytown and Bigtown. Now what I am trying to
do is have 2 comboBoxes, 1 for Street and 1 for Town on a Windows Form, and
on a Web Form for the Web System, and at runtime the Street comboBox loads
all the Streets and the Town comboBox loads all the Towns. When say the
Street is changed I want the Town comboBox to load all the Towns that the
Street is associated with. And if the Town is changed I want all the Streets
in that town to load. I am looking for a simple way of doing, I have tried
working with views but it's too complicated for my head. I know their is a
simple way to achive what I want but don't really know how, I have read about
reversing the DataRelations Keys but this sounds like it could have problems
long term. I am working with a DataSet where the tables are all related. I
would like to link all this without too much coding.

Cheers in advance guys. If I have not been clear let me know!!!!
Nov 16 '05 #1
0 967

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

Similar topics

2
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi everyone, I am writing some C# code using Visual Studio 2003 Enterprise Architech to allow addresses in a database, to be accessesd so that the data can be validated. I have 4 basic tables...
1
by: Chris Ashley | last post by:
I used the data form wizard and set up my relationships between tables... how do I make the foreign key a dropdown in the datagrid so it displays something meaningful rather than the foreign key...
2
by: yuanh23 | last post by:
Hi, I have 3 talbes "customers","orders","details". i wanna to use 3 datagrids to show those tables. and when the selected row in parent talbe changes, the selected row in child table changes...
3
by: pemigh | last post by:
A while back I imported tables to a new database via Files-->Get External Data --> Import... All was well for several months, and then the database started behaving badly in a couple of ways,...
17
by: deko | last post by:
Is there a Pattern or best Practice for getting relational data out of a database and into an object? The object in question has public properties that look like this: _stringName _ArrayList...
0
by: Michael | last post by:
Okay, maybe I am missing something. I created a dataset through VS2005 data manager. The set includes tables with child relationships. The tables and the relationships are included in the dataset....
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
5
by: Kosmos | last post by:
Hey :) hopefully someone can help me with this...I decided to take on the task of programming an access database for my legal co-op/internship...I'm studying law and music production on the...
16
by: Wayne | last post by:
I have an Access 2003 data file that has now corrupted twice in a week. The database is extremely simple with one main data table and a few lookup tables. The lookup tables are linked to the main...
6
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.