473,385 Members | 1,353 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.

Another database question <g>

Hey again. Thank you to everyone who responded to my question in the "Newbie
database question" thread. I've got a new problem, though. ;-)

I linked to an Access 2000 database. This database has a master table and
several other tables. For the sake of simplicity, I'll just call the Master
table "Master" and the other table I'm working with "Table2." I created two
OleDbDataAdapters (one for Master, and one for Table2). I am trying to make
it possible to type a person's last name into a text box, and have my
application search the Master table for the last name (in a field called
"nameLast"). Then it will retrieve the ID of that person (in a field titled
"ID"--there is a field of the same name in Table2). Once this is done, I
want to automatically display (in a DataGrid) the contents of all rows in
Table2 which have the same ID as the one in Master. But I'm having troubles
creating the relation between Master and Table2.

In the Edit Relation window, I selected "Master" as the parent element, and
"Table2" as the child element. The problem I'm having is determing what
values to set to the key, key fields, and foreign key fields. I tried to set
the key field and foreign key field to "ID," but although the ID seems to be
retrieved without problem from the Master table, I can't seem to complete
the relation to Table2 to display the information in the DataGrid. (I have
already set the properties of the DataGrid to their appropriate values.)
Also, I'm unsure of what the "Key:" text box (the one directly under the
"Parent element:" text box in the Edit Relation window) is for. Could
someone please help? Hope this makes sense. Thanks...

Jay
Nov 20 '05 #1
1 960
Cor
Hi Jay,

Did you already look in the samples from the resource kit master detail
datagrids?

Cor
Hey again. Thank you to everyone who responded to my question in the "Newbie database question" thread. I've got a new problem, though. ;-)

I linked to an Access 2000 database. This database has a master table and
several other tables. For the sake of simplicity, I'll just call the Master table "Master" and the other table I'm working with "Table2." I created two OleDbDataAdapters (one for Master, and one for Table2). I am trying to make it possible to type a person's last name into a text box, and have my
application search the Master table for the last name (in a field called
"nameLast"). Then it will retrieve the ID of that person (in a field titled "ID"--there is a field of the same name in Table2). Once this is done, I
want to automatically display (in a DataGrid) the contents of all rows in
Table2 which have the same ID as the one in Master. But I'm having troubles creating the relation between Master and Table2.

In the Edit Relation window, I selected "Master" as the parent element, and "Table2" as the child element. The problem I'm having is determing what
values to set to the key, key fields, and foreign key fields. I tried to set the key field and foreign key field to "ID," but although the ID seems to be retrieved without problem from the Master table, I can't seem to complete
the relation to Table2 to display the information in the DataGrid. (I have
already set the properties of the DataGrid to their appropriate values.)
Also, I'm unsure of what the "Key:" text box (the one directly under the
"Parent element:" text box in the Edit Relation window) is for. Could
someone please help? Hope this makes sense. Thanks...

Jay

Nov 20 '05 #2

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

Similar topics

5
by: john | last post by:
Hi I am devlopeing a data centric intranetsite with data in mysql database I would like your opinion on this architecture Data will be fetched from database by python & converted into xml The...
4
by: jason | last post by:
I would appreciate some help on how to convert a database table into an html file via FSO and whether more seasoned asp programmers recommned this route. The main reason I am attempting to do this...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
1
by: RJN | last post by:
Hi I'm using XMLTextReader to parse the contents of XML. I have issues when the xml content itself has some special characters like & ,> etc. <CompanyName>Johnson & Jhonson</CompanyName>...
1
by: RJN | last post by:
Hi I'm using XMLTextReader to parse the contents of XML. I have issues when the xml content itself has some special characters like & ,> etc. <CompanyName>Johnson & Jhonson</CompanyName>...
22
by: amygdala | last post by:
Hi, I'm trying to grasp OOP to build an interface using class objects that lets me access database tables easily. You have probably seen this before, or maybe even built it yourself at some...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
3
by: Josh Valino | last post by:
Hi, I have a client that has our product and in one of the aspx files, there is code like this: <%= SomePublicProperty %> where the public property returns a string. In the test...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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
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...

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.