Displaying related fields with an SQL database and ADO.NET

Okay, so I know how to display a singular table from an SQL databse into a datagrid, but I was never shown how to display related fields into one table.  Here is the problem:

I need to display student information for an online college solution. The information I need to display is First Name, Last Name, and some information from the course they are currently taking. Now - the student information is in a Student table and the course information is in (you guessed it) the Course table. The student table contains a foreign key, the courseID, which is obviously the key in the course table.
How do I display a datagrid that will use related records? Do I have to use an INNER JOIN statement with an SQL command?
0
generaltao
1/20/2005 5:26:30 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies
648 Views

Similar Articles

[PageSpeed] 39

yes you do have to do a Join between the Tables.  after that, you use the DataGrid just like you normally would.
0
jeffreyabecker
1/20/2005 7:02:23 PM
Reply:

Similar Artilces:

display images from SQL Server image across intranet using ado.net filestream object
folks  i recently attended an MCPD boot camp where they taught me to access and store images using SQL Server and the filestream object.  Previously i had (sensibly) used a file server and impersonation to copy files. Uploading works fine.  Viewing works fine in debug so i rolled out an app in my work where the pics are uploaded and viewed across the intranet. to my horror i realised (too late!) that whilst it works fine in debug, it does not work when published. now no one but me can access these pics and it is a night mare.  the only documentation i have found ...

How to call or retrieve fields from sql and display in table without using ADO.net, I'm using a dynamic link library....Is the coding different?
Help me! I'm doing my school project on Software Change Management Tool, CR Tracker. I want to display table in the webform, and the table data is retrieve form the sql server. So how do I call the sql so as to display the data in a table? hy..What does that dll contain ?Does it already contains relevant code to connect to a database ? Have a look hereThanksDinuj Nath The easy way to do this is with the use of a data bound grid. The Grid can be customised to look and feel you like. You will need to add a data adapter to your page and a grid. When you setup the data adapter you will nee...

Does .NET map calls for ADO to ADO.NET?
Hello,We are trying to troubleshoot some DB problems from COM objects that call ADO. I heard that when ADO is loaded inside of a COM object by a .NET app, that .NET intercepts the call and re-maps those calls over to ADO.NET. This seems untrue to me, given the nature of ADO.NET being a totally separate technology.Does anyone know for sure whether this does or does not occur?The problem we are seeing is actually almost identical in symptoms to this:http://support.microsoft.com/default.aspx/kb/230101"FIX: Data Queries Sporadically Return Empty Recordsets" Literally, this is what...

Innovation to ADO.NET
Matisse Software Inc. provides its native ADO.NET Data provider for Matisse 6.0, the Database for .NET. Matisse Software has pushed the envelope of Microsoft ADO.NET architecture and extended it into a powerful Object Access Services component for .NET. Matisse’s extension of ADO.NET demonstrates that ADO.NET can evolve beyond the Microsoft architecture to benefit .NET developers. Unlike the standard ADO.NET data provider, which returns data in a table format to integrate seamlessly with relational products, Matisse has extended the ADO.NET architecture to return data in an object format....

ADO.NET table fields pass to a VB.NET variable
Hi, please help, have a ADO.NET code. 1 Dim conn As New Data.SqlClient.SqlConnection 2 Dim sql As New Data.SqlClient.SqlCommand 3 4 conn = New Data.SqlClient.SqlConnection("Provider=SQLOLEDB.1;Password=dbsystematics;Persist Security Info=True;User ID=sa;Initial Catalog=SARS;Data Source=4G") 5 conn.Open() 6 sql = New Data.SqlClient.SqlCommand("select * from users", conn)   Then i would like to pass the values that the above ADO.NET to a variable.how?please help. JFRBPH12™ You can execute the ...

ADO in VB6 vs ADO.NET in VB.NET
I am writing a database interface and I would like to know whether a VB6 interface using ADO or a VB.NET interface using ADO.NET would be faster in terms of just performing database operations. Is there an explanation for this, and what is the magnitude of the difference? Thanks in advance!...

ado.net or/and datawindow.net
Hi, Can datawindow.net work with Sybase's ado.net or are they not compatible with each other. We have two separate groups of developers, one group develops web apps using ASE as the back end for the data, so they use a combination of Visual Studio ..NET and Sybase's ado.net to do their work. We have another group that develops client/server apps using Powerbuilder, but since 80% of their work is in writting reports using Powerbuilder, I was wondering if they could use a combination of datawindow.net and ado.net to put make these reports available on the web through ...

Any examples about using Object Database with ADO.NET(c#)
Can I have any examples source codes about using Object Database with ADO.NET(c#) Is this a particular db or Object DB vs Relation DB? If the latter here is one link I found <a href = "http://www.informit.com/content/index.asp?product_id=%7BA2B9405F-6B83-4474-B034-BC613B68EB1B%7D">http://www.informit.com/content/index.asp?product_id=%7BA2B9405F-6B83-4474-B034-BC613B68EB1B%7D</a>. You might want to also check the threads on the Architecture forum on O/R mappers like Entity Broker, Norpheme etc. HTHEric LandesMADNUG President http://www.madnug.netCrystal Alliance Edit...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release som...

How to display dataSet text field in a Label using ADO.NET?
Hello folks. What is the best way to display in a Label one column from a selected row in a GridView? The gridView is populated manually in the code behind, and it displays the data. The column in question is not one of the bound columns in the gridView, but is part of the dataSet (ie, the gridView shows columns 1-3, but I want to display column4 in a label. I started on code to identify the key, but not sure where to go from there. Sorry to bother the forum with this, but after several hours of searching the web and reading I still could not figure it out. many thanks in advance, Chris.Here...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

problem with Connecting to a SQL Anywhere Studio Database Using ADO.NET
I am trying to connect and read the data from the asademo.db database that is used in the document "Connecting to a SQL Anywhere Studio Database Using ADO.NET ". I am using Sql Anywhere v7.0 and MS Visual Studio .Net 2003 with C#. I can connect to the database but I get a 'Specific cas is not valid' exception when I try to run the myReader = myCommand.ExecuteReader() line in the demo course. Can anyone tell me why it is not working? I'm getting the same error using V7.0.2.1402. Did you find any solution/workaround? You need a more recent version of the A...

Displaying fields in same was as <%=(field)%> in .net
Hi, I am very new to .NET after aloways programming in ASP. Thought I would try and rewrite a site of mine using the new beta and Visual Web Developer. First impressions are good, there are some great tools there to save a load of time with the Datagrids etc. However I am stuck on how to do something I use 99% of my time in ASP and is holding me up! Before I would create a recordset using sSQL = "SELECT Name FROM Albums WHERE Uid = 1 ORDER BY Name" Set RsAlbum = Conn.Execute(sSQL) Name = RsAlbum("Name") Then in the HTML I could display the result by using <%=(Name)%> ...

Cannot connect to SQL Server database using ado.net after IP address has changed
Dear all, I wasn't able to connect to my SQL server 2000 database (which reside in the network in a windows 2003 server) after the IP address of the server has changed and the server is shut down, moved and re-started. I was able to connect to this server by using ADO using VB. I was able to register this server in my EM and was able to create ODBC connection. Just when using ADO.NET, I wasn't able to connect. Any ideas? Will there be any caching within ADO.NET still pointing to the old IP address? Thank you for all the help in advance. There are a lot of variable possibilites her...

Web resources about - Displaying related fields with an SQL database and ADO.NET - asp.net.object-datasource

List of birds displaying homosexual behavior - Wikipedia, the free encyclopedia
This list includes birds for which there is documented evidence of homosexual or transgender behavior of one or more of the following kinds: ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

Displaying calorie labels at fast-food restaurants doesn't appear to work: study
While the high calorie counts of artery-clogging fast foods are often printed right in front of our eyes, most people ignore them and go ahead ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Google begins displaying “Listen Now” ads for streaming music services (including Beats) in search results ...
... , Streaming Music Continue reading more about Apps , Google , and Spotify at 9to5Mac . What do you think? Discuss "Google begins displaying ...

Resources last updated: 1/18/2016 2:50:20 PM