Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update SQL Server from ASP.NET page
Message
 
 
À
30/06/2009 22:46:05
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01409449
Message ID:
01409538
Vues:
53
Bonnie,

I kind of sort of (with my limited knowledge) thought that Web Service is often used in WinForm.net applications where the application is not on the server. Thanks you for confirming it.

I will read the tutorial recommended by Dorin that covers creating a DAL for ASP.NET application. And then see if I can restart my learning of SQL Server stored procedures. I have written one stored procedure about 2 years ago; this is how much experience I have <g>

Thank you for your 2 cents <g> (actually it is much more though).


>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
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform