2 Replies - 588 Views - Last Post: 17 May 2011 - 08:00 PM Rate Topic: -----

#1 aks0124  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 24-March 11

Creating New Table/DataSet.or retrieving data from 2 tables in a DataS

Posted 04 May 2011 - 05:09 AM

Hi,
I am working on mobile application in asp.net,I have to show data which coming from 3 tables residing in a DataSet.
these tables's DataSet is not stored in DataBase but created dynamically through web Service.
Now I want to feth the data from 3 table and create a DataSet/ Table which can be bound to a ObjectList contol through it's DataSource property to show on listing page.
for example-

Table-FlightFare
(columns)
itineraryId
currency

adult_baseFare
adult_tax
FlightFare_Id
fareList_Id


Table-ob_flight
(columns)

airlineCode
airlineName
flightNumber
originCode
destinationCode
originName
destinationName
departureTime
arrivalTime
FlightFare_Id


Table-ib_flight

(columns)
airlineCode
airlineName
flightNumber
originCode
destinationCode
originName
destinationName
arrivalTime
FlightFare_Id




I have to show the lists of flghts with their names and fare ..I have to pull the data from ib_flight and FlightFare, showing up the airlineCode,airlineName,arrivalTime,adult_baseFare+adult_tax.

It's being 3 days to find a the way to retrieve the data but still couldn't found the way.

Is This A Good Question/Topic? 0
  • +

Replies To: Creating New Table/DataSet.or retrieving data from 2 tables in a DataS

#2 marinus  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 135
  • View blog
  • Posts: 575
  • Joined: 14-April 10

Re: Creating New Table/DataSet.or retrieving data from 2 tables in a DataS

Posted 17 May 2011 - 06:49 PM

What you require is to search on a code that links these 2 tables , you can use leftjoin tables also..

E.g

column FlightFare_Id in FlightFare table will be used to get data in the other tables because that also has the FlightFare_ID column

Look up on LEFTJOIN SQL query
Was This Post Helpful? 0
  • +
  • -

#3 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Creating New Table/DataSet.or retrieving data from 2 tables in a DataS

Posted 17 May 2011 - 08:00 PM

Can you provide some of the code you've tried? It would at probably make it a little clearer what you're trying to do and also it's hard to say what you may be doing wrong when we don't know what you're doing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1