473,385 Members | 1,958 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,385 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 964

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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.