?
Solved

web service designer generated code in WCF

Posted on 2012-09-20
1
Medium Priority
?
824 Views
Last Modified: 2012-09-24
I convert a web service to WCF service, the web service has designer generated code, include a method, the InitializeComponent(), inside it has a SqlConnection1, SqlDataAdapter1, SqlSelectCommand1, and there is a sql statement for SqlSelectCommand1, should I move this method to WCF service?  How to move it?


<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()


end sub
0
Comment
Question by:5281
1 Comment
 
LVL 25

Accepted Solution

by:
apeter earned 1000 total points
ID: 38426824
InitializeComponent, method can be reused. Call it the same way as it was called in web service.

But is always a better to open a connection and close it inside the web method.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question