Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. DataReader reading data from multiple tables

DataReader reading data from multiple tables

Scheduled Pinned Locked Moved Database
databasehelpcsharpmysqlquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abhishk2001 yahoo com
    wrote on last edited by
    #1

    Hi, my query is given below. "select dp.detail from procdure p, mentryi m, dtentryp dp where m.master=p.proc and dp.master =m.detail and m.item=481" when i am running the query its giving me the output, that is fine. now using ado.net DataReader, how do i read individual columns from different tables. I am using DataReader b'coz, I am reading a BLOB field from mysql database and converting into .jpg images, that is also working fine, if i am reading from just one table. I need to read specified columns from different tables in the same DataReader. if i am using the instance like "p" for procdure table, it is giving me error and its not identifying the variables associated with the table. Any help would be appreciated.. vijay

    L 1 Reply Last reply
    0
    • A abhishk2001 yahoo com

      Hi, my query is given below. "select dp.detail from procdure p, mentryi m, dtentryp dp where m.master=p.proc and dp.master =m.detail and m.item=481" when i am running the query its giving me the output, that is fine. now using ado.net DataReader, how do i read individual columns from different tables. I am using DataReader b'coz, I am reading a BLOB field from mysql database and converting into .jpg images, that is also working fine, if i am reading from just one table. I need to read specified columns from different tables in the same DataReader. if i am using the instance like "p" for procdure table, it is giving me error and its not identifying the variables associated with the table. Any help would be appreciated.. vijay

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      u can acess any column by this dr.getstring(x) where dr is datareader object getstring is data type column and x index of column which starts from 0 for the first column;P

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups