Hi Kubben, i think this helps, thanks for your suggestion.
Pradeep Shamarao
Posts
-
Function does not return value on all code paths [modified] -
Function does not return value on all code paths [modified]Hi, I am using a simple function which returns a dataset. I get a warning that function does not return value on all code paths.Normally i just say throw in the catch block, which solves the problem. But as i am implementing enterprise exception block the suggestion is to use a policy with if(rethrow) statement, which i beleive creates the warning as throw is hidden inside if statement. I can say return nothing at the end of catch but i was wondering What is the best way to get rid of the warning. Public Function SearchEscalationMails() As DataSet Try Dim dbResourcePlanning As Database = DatabaseFactory.CreateDatabase() Dim strProcName As String = "SearchMailEscalations" Dim dbSPCommand As DbCommand = dbResourcePlanning.GetStoredProcCommand (strProcName) dbResourcePlanning.ExecuteDataSet(dbSPCommand) Return dbResourcePlanning.ExecuteDataSet(dbSPCommand) Catch ex As Exception Dim bRethrow As Boolean bRethrow = ExceptionPolicy.HandleException(ex, "BusinessLayerPolicy") If (bRethrow) Then Throw End If End Try End Function -- modified at 10:49 Sunday 29th April, 2007
-
Reg Stored Proc Parameter usage & performanceI have to create stored procs for insertions and updates for a new project with lots of parameter (around 20 to 35), i wanted to know the advantange and disadvantages of the two methods below Method 1. --- the usual way Create Procedure SaveNewSettings @param1 varchar(20),@param2 varchar(20),@param3 varchar(20), @param4 varchar(20),....etc ---- insert into table values ( Method 2. -- the xml way Create Procedure SaveNewSettings @XMLParam As varchar(200) AS EXEC sp_xml_preparedocument @hDoc OUTPUT , @XMLParam --- Do the openxml stuff and update Which method of using parameters is better wrt performance and usability. Please suggest. I am using SQL Server 2000 & ASP.Net (VB.net as code behind) for my project.
-
Connection String and Entlib DAABI am using .net 1.1 /sql server 2000, recently moved from the old Application block to Entlib data application block June 2005. In all our applications we store the connection string in web.config file using custom encryption (VB dll). ex: we used to decrypt the same and pass the conn string to sqlhelper. The new DAAB provides only : Dim db As Database = DatabaseFactory.CreateDatabase() without an option to pass connection string, i can use the dataConfiguration.config to store connection string but how to encrypt and decrypt. I cant use clear text for connection strings any other encryption methodology also cant be used. Please help i am unable to find a solution, code snippets are very much needed.
-
Drill Down Crystal Report!!Yes, u can link sub reports based on some criteria. U should use some other discussion forum for product specific questions. cool man
-
WebRequest.Response takes long time...Hi, There is a direct method to download file WebClient.DownloadFile very simple. I am using this, not very sure this help u in performance improvement. cool man
-
how to saves imagesI guess u need to save / download image, when u know its url using some procedure. If this the case u can use WebClient.DownloadFile (simple), or use HttpWebRequest and HttpWebResponse. cool man
-
A simple FileSystemWatcher Question ( How to see if file has copied)I had a similar problem, I dint find any direct approaches like filecopied event or something similar,may be this will be of some help. Use the Changed event, select the LastWrite notify filter. u will get approx 3 events raised for each file activity. keep a counter when it has reached 3 u can be relatively sure that the file has been fully copied then u can check for file size. cool man
-
Source Safe is driving me mad!We had a similar problem, It may be of some help to u, u can create add the common project to ur existing soln and put it vss. so that when u get the soln to ur local copy u get both the projects along. (In our case the no of projects were less so we got away with this) cool man
-
Unable to debug -
Web Service FailureCan u be more specific about the error message. could it be due to session timeout? cool man
-
Session in ASP.NET webservicesI had similar problems, may be this will help. Hope u have used this [WebMethod(EnableSession=true)] for your webmethods from the client side sometimes cookie collection has a problem try this before u call ur webservice method using System.Net; private CookieContainer cookies; Service1 testService = new Service1(); if (cookies==null) { cookies = new System.Net.CookieContainer(); } testService.CookieContainer = cookies; cool man
-
Is my C# app installed?It would be simpler if the client informs the server when it is run first time, maybe to a database or through a web service. cool man
-
XML navigation help neededIf u r looking for tools, u can use xmlspy. I guess there is a free version also. cool man
-
Sending a file to a WebserviceIf the file u r refering is in xml u can use xmlnode / xmldocument else u can send as an array of bytes and create the file on the server. cool man
-
Socket remote node disconnectionI guess there will be some sort of timeout. cool man
-
Sockets and threads! How to scale well :PWe found that WebClient.DownloadFile or HttpWebRequest and HttpWebResponse has problems when the user is using proxy. we tried using proxy class to supply relevent information that also did not work. Further the download seemed faster with the extra library since it downloaded parts of the file (using threads) and joined them later. we dint have any problems with the proxy also. Does the BCL classes also implement the same? cool man
-
How can i add 2 querys from a select statementU can try something like create view vwtest as select A.X S from Table A where union select B.X S from Table B where select sum(S) from vwtest cool man
-
.net messes up with forms and controlsjust check whether u r using any 3rd party components. That may be the reason for ur problem cool man
-
How to distinguish Web apps vs Win appsI don't exactly understand ur question. All web projects has to use the system.web namespace to run as a web app. U can use Ildasm.exe provided by .net framework and check its mainfest if u see something like .assembly extern System.Web u can know that it is supposed to be deployed as a web app else win app. cool man