Best Practices Question - Data Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gb

    #1

    Best Practices Question - Data Access

    hi,

    i'm working on a large project involving numerous tables.
    there are instances, that i only need to do a simple select statement
    for each table (e.g. select * from table1 or select fld1, fld3 from table1
    or
    select fld1,fld2 from table2). my question is, do i need to create stored
    procedure (SP) for each? because if i do, i will be having a lot of SPs
    for a single table alone.

    thanks in advance.

    --


  • Jeff Louie

    #2
    Re: Best Practices Question - Data Access

    FWIW, stored procedures are also useful as a means of protecting data
    from unauthorized access.

    Regards,
    Jeff

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • Benny Mathew

      #3
      Re: Best Practices Question - Data Access

      It is better to have SPs from the security point of view.

      Cheers
      Benny

      gb wrote:
      [color=blue]
      > hi,
      >
      > i'm working on a large project involving numerous tables.
      > there are instances, that i only need to do a simple select statement
      > for each table (e.g. select * from table1 or select fld1, fld3 from table1
      > or
      > select fld1,fld2 from table2). my question is, do i need to create stored
      > procedure (SP) for each? because if i do, i will be having a lot of SPs
      > for a single table alone.
      >
      > thanks in advance.
      >
      > --
      >
      >[/color]

      Comment

      • JPM

        #4
        Re: Best Practices Question - Data Access

        Jeff,
        As a newbie also, I'm in a position at work, where I need to basically teach myself
        EVERYTHING about programming in .NET/SQL 2000.

        I've been playing with C# for about 4 months now, and I've seen a few examples of ASP.NET
        app's that connect to an SQL 2000 DB using a SP, but I could never 'find' the code to practice
        making my own.

        Do you have any examples or know of where I can actually 'get' my hands on code to do this.
        Obviously, the actual connection string properties would be for the Server(s), UID & P/W's at
        work, but with an example, I can practice the implementation thereof without beating my head on
        a brick wall every day (though I wonder if sometimes I like doing that..<grin>).

        TIA

        JPM

        "Jeff Louie" <jeff_louie@yah oo.com> wrote in message
        news:%23ZkA8zdc DHA.3068@TK2MSF TNGP11.phx.gbl. ..[color=blue]
        > FWIW, stored procedures are also useful as a means of protecting data
        > from unauthorized access.
        >
        > Regards,
        > Jeff
        >
        > *** Sent via Developersdex http://www.developersdex.com ***
        > Don't just participate in USENET...get rewarded for it![/color]


        Comment

        • Andrew

          #5
          Re: Best Practices Question - Data Access

          Look at MSDN at the Data Access Block:

          http://msdn.microsoft.com/library/de...ml/daab-rm.asp


          "JPM" <Someone.NoSpam @Nunya.org> wrote in message
          news:uMPVZLncDH A.1580@tk2msftn gp13.phx.gbl...[color=blue]
          > Jeff,
          > As a newbie also, I'm in a position at work, where I need to basically[/color]
          teach myself[color=blue]
          > EVERYTHING about programming in .NET/SQL 2000.
          >
          > I've been playing with C# for about 4 months now, and I've seen a few[/color]
          examples of ASP.NET[color=blue]
          > app's that connect to an SQL 2000 DB using a SP, but I could never 'find'[/color]
          the code to practice[color=blue]
          > making my own.
          >
          > Do you have any examples or know of where I can actually 'get' my[/color]
          hands on code to do this.[color=blue]
          > Obviously, the actual connection string properties would be for the[/color]
          Server(s), UID & P/W's at[color=blue]
          > work, but with an example, I can practice the implementation thereof[/color]
          without beating my head on[color=blue]
          > a brick wall every day (though I wonder if sometimes I like doing[/color]
          that..<grin>).[color=blue]
          >
          > TIA
          >
          > JPM
          >
          > "Jeff Louie" <jeff_louie@yah oo.com> wrote in message
          > news:%23ZkA8zdc DHA.3068@TK2MSF TNGP11.phx.gbl. ..[color=green]
          > > FWIW, stored procedures are also useful as a means of protecting data
          > > from unauthorized access.
          > >
          > > Regards,
          > > Jeff
          > >
          > > *** Sent via Developersdex http://www.developersdex.com ***
          > > Don't just participate in USENET...get rewarded for it![/color]
          >
          >[/color]


          Comment

          • JPM

            #6
            Re: Best Practices Question - Data Access

            Andrew,
            Thanks! I'll play with that tomorrow at work (kinda nice to be in a position where I have
            no deadlines; simply write code at my leisure and do R&D)...:)

            JPM

            "Andrew" <a.dunn@d2k.com .au> wrote in message news:u%2328tQnc DHA.384@TK2MSFT NGP12.phx.gbl.. .[color=blue]
            > Look at MSDN at the Data Access Block:
            >
            > http://msdn.microsoft.com/library/de...ml/daab-rm.asp
            >
            >
            > "JPM" <Someone.NoSpam @Nunya.org> wrote in message
            > news:uMPVZLncDH A.1580@tk2msftn gp13.phx.gbl...[color=green]
            > > Jeff,
            > > As a newbie also, I'm in a position at work, where I need to basically[/color]
            > teach myself[color=green]
            > > EVERYTHING about programming in .NET/SQL 2000.
            > >
            > > I've been playing with C# for about 4 months now, and I've seen a few[/color]
            > examples of ASP.NET[color=green]
            > > app's that connect to an SQL 2000 DB using a SP, but I could never 'find'[/color]
            > the code to practice[color=green]
            > > making my own.
            > >
            > > Do you have any examples or know of where I can actually 'get' my[/color]
            > hands on code to do this.[color=green]
            > > Obviously, the actual connection string properties would be for the[/color]
            > Server(s), UID & P/W's at[color=green]
            > > work, but with an example, I can practice the implementation thereof[/color]
            > without beating my head on[color=green]
            > > a brick wall every day (though I wonder if sometimes I like doing[/color]
            > that..<grin>).[color=green]
            > >
            > > TIA
            > >
            > > JPM
            > >
            > > "Jeff Louie" <jeff_louie@yah oo.com> wrote in message
            > > news:%23ZkA8zdc DHA.3068@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
            > > > FWIW, stored procedures are also useful as a means of protecting data
            > > > from unauthorized access.
            > > >
            > > > Regards,
            > > > Jeff
            > > >
            > > > *** Sent via Developersdex http://www.developersdex.com ***
            > > > Don't just participate in USENET...get rewarded for it![/color]
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...