dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Linking Tables in Data Set or Stored Procedure

  1. #1
    Join Date
    Mar 2008
    Posts
    6

    Linking Tables in Data Set or Stored Procedure

    Im currently in the process of developing a new system in ASP.net. The system uses multiple tables from a SQL database. To link information from say the products table to the suppliers table a unique key from the suppliers table is stored in the products table to show which products each supplier has bought...simple so far.

    From this I can then pull out any of the information relating to that product instead of just displaying the ID. Currently this is done by creating a stored procedure and then dragging the stored procedure onto the dataset layer to create the data adapter.

    Im not 100% this is the best way to be doing this. Is it possible to simply just link the tables in the dataset layer to display a string from another table instead of an ID referencing number?!

    any help on this would be much appreciated as I cant really continue untill I have sorted out the data structure problems.

    Thanks in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    If all that you are doing is looking at the data, you could create a View that contains the elements you want and use it jut like you would any other table.
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Mar 2008
    Posts
    6
    Views are just like using stored procedures though arnt they? Is it not possible to pull the value from the linked table via the BLL or within the dataset itself?

  4. #4
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Quote Originally Posted by dmowfo
    Views are just like using stored procedures though arnt they? Is it not possible to pull the value from the linked table via the BLL or within the dataset itself?
    No, actually views are more like tables than stored procedures. Their data is always on the server (rather than executed) and you can query them just like you would query a table.

  5. #5
    Join Date
    Mar 2008
    Posts
    6
    could you give me an example of how this would work?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles