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. Can we use sql connections for threads?

Can we use sql connections for threads?

Scheduled Pinned Locked Moved Database
questiondatabasesql-serversysadminperformance
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.
  • P Offline
    P Offline
    pubududilena
    wrote on last edited by
    #1

    HI, I am using SQL SERVER 2005. I need to find what is the best performance method for my 3 sql Data adapters. first method:- 1) Open sql connection 2) Initialise 1st data adapter and fill for the data table 1. 3) Initialise 2nd data adapter and fill for the data table 2. 4) Initialise 3rd data adapter and fill for the data table 3. 5) Process my work 6) close connection. second method:- a) 1. Open sql connection 2. Initialise 1st data adapter and fill for the data table 1. 3. close connection. b) 1. Open sql connection 2. Initialise 2nd data adapter and fill for the data table 2. 3. close connection. c) 1. Open sql connection 2. Initialise 3rd data adapter and fill for the data table 3. 3. close connection. d) 1. Use thread concept for a) ,b) and c) and take results for adapters. 2. process my work. so can any one tell me what is the best performance method? first method or second method? Thanks

    P 1 Reply Last reply
    0
    • P pubududilena

      HI, I am using SQL SERVER 2005. I need to find what is the best performance method for my 3 sql Data adapters. first method:- 1) Open sql connection 2) Initialise 1st data adapter and fill for the data table 1. 3) Initialise 2nd data adapter and fill for the data table 2. 4) Initialise 3rd data adapter and fill for the data table 3. 5) Process my work 6) close connection. second method:- a) 1. Open sql connection 2. Initialise 1st data adapter and fill for the data table 1. 3. close connection. b) 1. Open sql connection 2. Initialise 2nd data adapter and fill for the data table 2. 3. close connection. c) 1. Open sql connection 2. Initialise 3rd data adapter and fill for the data table 3. 3. close connection. d) 1. Use thread concept for a) ,b) and c) and take results for adapters. 2. process my work. so can any one tell me what is the best performance method? first method or second method? Thanks

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      third method:- 2) Initialise 1st data adapter 3) Initialise 2nd data adapter 4) Initialise 3rd data adapter 1) Open sql connection 2) fill for the data table 1. 3) fill for the data table 2. 4) fill for the data table 3. 6) close connection. 5) Process my work As to your second method... you do know that the DataAdapter will handle the open/close for you don't you? Better yet, don't use DataAdapters, but that's another subject. P.S. And why use separate ones rather than only one?

      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