Which data sourse you like?
-
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 :)
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
-
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
-
I know most of the professionals like to follow the traditional way. It is more flexible but it is time consuming. Isn’t it?
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
-
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
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?
-
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?
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
-
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
-
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.
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
-
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