Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update SQL Server from ASP.NET page
Message
From
30/06/2009 19:13:34
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01409449
Message ID:
01409486
Views:
50
Dimitry,

If the SQL server is going to be readily available on the same network then by all means just use a Data Access Layer that connects directly to it. You can always change that down the road if the need arises so long as you use a data access layer apart from your UI layer. If there is a DBA involved they may likely require you to access the data via SP's. Also stored procedures will be much easier to test, use and maintain in the long run. Learning to create SP's is not a big curve to learn and there is plenty of help here.
Tim

>Tim,
>
>You bring up a good point about SQL Server location. I believe it will be on the same network but where, I don't know yet. I presumed that I would be able to connect to the SQL Server directly. I don't even know what to ask the customer IT manager to find out what type of connection I could have to the SQL Server. I would prefer not to use Web Service for the simple reason that I know nothing about it. And I am trying to make this project to work as simple as possible. My web applicatin is very simple. It has in essence 2 features: 1 - user enters data on a page and the Submit creates a record in a table. 2 - user enters a key value and gets to see the status of the record. The record itself will not be updated by the ASP.NET application (after initial insert) but by a VFP application. The VFP application, btw, will be communicating with a Pocket PC (sending the data back and forth in the form of XML files). As far as a framework, I will probably not use one; at least in the first phase of this project (of course, if customer approves it).
>
>As to Stored Procedure, do you suggest using SP because it is faster or easier to maintain? My approach (again maybe not so accurate since I don't have much experience) was going to be not to use stored procedures. The reason, I thought, that I will have more control/access to the ASP.NET application than to the SQL server. And if there is a bug or something need to be changes quickly I could do it in the ASP.NET and not to have to go into database to update a stored procedure. Again, maybe this is because I have not worked much with stored procedures and not really sure how to do it right.
>
>Thank you for your input.
>
>
>>
>>I am wondering about where the SQL Server lives compared to where your Web application would live. In other words, would you use a direct connection to the SQL Server on the same network? Another idea to look at is creating a Data Access Web service (WCF Actually) to expose and control the access to the SQL Server. Then your web application becomes more flexible as well. If you were using a framework this might be pretty easy to get setup. I have done this inside of a days work for my current Web Application project with Mere Mortals framework.
>>
>>Besides this, the other methods are not really that hard. Either way as exposed web service methods or direct connection to SQL I would recommend using Stored Procedures for the data access.
>>Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform