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. Web Development
  3. ASP.NET
  4. Which data sourse you like?

Which data sourse you like?

Scheduled Pinned Locked Moved ASP.NET
cssdatabasebusinessquestion
9 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.
  • J Offline
    J Offline
    janet2008
    wrote on last edited by
    #1

    I don't like SqlDataSouce because it is difficult to handle the inline sql. I always using the ObjectDataSource which can use to call business layer functions directly. I am happy that I can bind a grid with a few mouse clicks :)

    N 1 Reply Last reply
    0
    • J janet2008

      I don't like SqlDataSouce because it is difficult to handle the inline sql. I always using the ObjectDataSource which can use to call business layer functions directly. I am happy that I can bind a grid with a few mouse clicks :)

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      To be honestly, I don't like any datasource controls like (SQLDataSource,ObjectDataSource). I prefer to write my own code to handle databinding. It gives more flexibility to me.

      All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

      J 1 Reply Last reply
      0
      • N N a v a n e e t h

        To be honestly, I don't like any datasource controls like (SQLDataSource,ObjectDataSource). I prefer to write my own code to handle databinding. It gives more flexibility to me.

        All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

        J Offline
        J Offline
        janet2008
        wrote on last edited by
        #3

        I know most of the professionals like to follow the traditional way. It is more flexible but it is time consuming. Isn’t it?

        N 1 Reply Last reply
        0
        • J janet2008

          I know most of the professionals like to follow the traditional way. It is more flexible but it is time consuming. Isn’t it?

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          janet2008 wrote:

          but it is time consuming. Isn’t it?

          Yes, it is. But it's negligible as your application is getting a good architecture.

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

          J 1 Reply Last reply
          0
          • N N a v a n e e t h

            janet2008 wrote:

            but it is time consuming. Isn’t it?

            Yes, it is. But it's negligible as your application is getting a good architecture.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

            J Offline
            J Offline
            janet2008
            wrote on last edited by
            #5

            Ok ok :) You talk about the good architecture. Let me ask one question here. Suppose you have a “price” field with the “decimal” data type in your database. Now you are writing a function to save data to this table. This function receives values for insert as parameters and calls a stored procedure. Is there problem that pass the “price” as string into this functions? I mean any performance problem or something like that?

            N 1 Reply Last reply
            0
            • J janet2008

              Ok ok :) You talk about the good architecture. Let me ask one question here. Suppose you have a “price” field with the “decimal” data type in your database. Now you are writing a function to save data to this table. This function receives values for insert as parameters and calls a stored procedure. Is there problem that pass the “price” as string into this functions? I mean any performance problem or something like that?

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              janet2008 wrote:

              I mean any performance problem or something like that?

              Nope, there won't be any performance problem. But since you know the price field can contain only “decimal” values, why to use string for parameter ?

              All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

              J 1 Reply Last reply
              0
              • N N a v a n e e t h

                janet2008 wrote:

                I mean any performance problem or something like that?

                Nope, there won't be any performance problem. But since you know the price field can contain only “decimal” values, why to use string for parameter ?

                All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

                J Offline
                J Offline
                janet2008
                wrote on last edited by
                #7

                It is because, usually user input price in a text box. So if I write a function with a decimal parameter, I have to cast the textbox output. Since both method gives same result I thought to avoid this casting.

                N 1 Reply Last reply
                0
                • J janet2008

                  It is because, usually user input price in a text box. So if I write a function with a decimal parameter, I have to cast the textbox output. Since both method gives same result I thought to avoid this casting.

                  N Offline
                  N Offline
                  N a v a n e e t h
                  wrote on last edited by
                  #8

                  But if you declare the parameter as string, you need to cast it before you update database. In both ways you are doing casting.

                  All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

                  J 1 Reply Last reply
                  0
                  • N N a v a n e e t h

                    But if you declare the parameter as string, you need to cast it before you update database. In both ways you are doing casting.

                    All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions

                    J Offline
                    J Offline
                    janet2008
                    wrote on last edited by
                    #9

                    The stored procedure parameter is decimal type. But sqlparameter class will receive parameter value as “object”. So I didn’t do anything for casting. I don’t know what will happen in ADO.NET

                    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