Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update SQL Server from ASP.NET page
Message
From
30/06/2009 22:46:05
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01409449
Message ID:
01409500
Views:
44
Dmitry,

You probably will want your web page to call methods in a Biz/DataAccess layer directly rather than through a Web Service. You're already on a web server, so you're already server-side ... seems wasteful to hit up the server again with a web service call.

Also, I would recommend SPs anyway, but it seems to me that it would also be lots easier for you, since you said your current ASP.NET calls VFP SPs. OK, the SQL SPs will probably be different, but you can make the interface to them the same by using the same SP names and the same parameter names. Not much to change in your ASP code then.

My 2 cents,
~~Bonnie




>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
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform