Hi...!!I am Rahul Sharma and i am facing a problem in my .net based application.i hava a form in which there are 3 text box and 1 drop down list box.There are 2 tables in the Database named as Name (id(Primary key),name ,City and Cityid(Foreign key)) and another table is City (cityid(Primary key ) , city_name ) we have to inset the value through the text box into the Databse and reterive these values in the page form the database using the GRIDVIEW Control..
If anybody knows
the coding for that part.Please let me know at my email id i.e. [email protected] or [email protected] or you can
contact me at +91-9015759528,
I shall be very grateful to you...
Thanks
With Regards
Loading
NainilPosted Feb 20, 2010, 8:42 AM
There should be no effect on performance if you used queries instead of stored procedures. It is a better practice of using stored procedures for securtiy purporses as well as organizational purposes. Since the stored procedure is stored in SQL server, you can modify it anytime and all the applications using that stored procuedures will be affected. Whereas if you had queries written in the application, you will have to manually update all the queries.
For the sample purpose, I had written the connection string in the aspx page, but the best place to put them is in the web.config file. Hope this helps.
RujutaPosted Feb 20, 2010, 1:25 AM
Rahul SharmaPosted Feb 20, 2010, 12:50 AM
The information that you have given to me.It is very useful for me and one thing that i want to know that how much performance will reduce if i use QUERIES instead of STORED PROCEDURES.Will it be useful?The connection sting i have put in my .cs file or should place in web.config?
Thanks
NainilPosted Feb 19, 2010, 3:50 PM
From the information you have given, I have attached a sample for you. I have also included the stored procedures that I've used in my sample. The sample should work once you provide correct connectionString on both the webpages. I have also maintained the same table structure as you've mentioned. Hope this helps.