searchI Formula C Effective Study 06M 2006 E Formula zhsearchc Formula Sz Effective Study searcha Study s Effective asearchc 2006 esearcheac Study S Effective tdyy Study fsearche Effective t Study vetdyorusearcha Effective t Study er Formula hsearch search0 Formula 6 Baby r Stsearchd 2006 Study easearchcor Effective 206 Effective s Formula ac Study afr Formula usearchaRe Szh rsearchh
This is just intended as proof of concept. I do feel that if you wish to consume web services from SQL Server, then you should probably put this code in an assembly outside SQL Server and then call that assembly from the CLR within SQL Server. This will make it more maintainable when, for example, the web service changes. If you then need to rebuild the references etc., it will be easier to do this in an external assembly rather than in assemblies stored in SQL Server.
In this scenario we have a web service that return the current temperature for the provided city. We wish to consume this information from within SQL Server and store it in a table. Let’s do this from scratch.

Step 1 is to create the web service itself.
In Visual Studio, create a new ASP.Net Web Service project in a web site (called Weather in this example) call it “WeatherService”.
Delete the default WebMethod and create a new one that will return the temperature for provided city. Call this method “GetTemperatureForCity”.

Read more: Common tips and tricks from a SQL Developer Support perspective
Posted via email from .NET Info
Delicious Twitter Facebook Digg Stumbleupon Technorati RSS
Links to this post

Scrypt Enhanced Cryptography for Silverlight 3+

0 comments
Project Description
The Scrypt enahnced cryptography library provides additional cryptographic capabilities for Microsoft Silverlight 3+. In this initial release we've added RSA Encryption with support for key sizes from 256-bit to 4096-bit.

This library is fully compatible with .NET's built in RSACryptoServiceProvider.

For some usage examples, please visit my blog:
post/Asymmetric-Encryption-and-Signing-with-RSA-in-Silverlight.aspx

Limitations
This library limits the allowed key size to the range of 256-bit to 4096-bit. This is strictly due to the functionality of the employed BigInteger class that is used which initializes a fixed array for data storage. While this size can be increased to allow for larger keys, I found the negative impact on performance to be unacceptable. Likewise, I performed a full conversion of the BigInteger class to utilize generics instead of fixed arrays but the performance impact of this approach was also unacceptable.

Read more: Codeplex
Posted via email from .NET Info
Delicious Twitter Facebook Digg Stumbleupon Technorati RSS
Links to this post

Difference between int.Parse and Convert.ToInt32

0 comments
I know this post sound basic to most of people but still lots of people does not know this. So I decided to post a blog post for this. Both int.Parse and Convert.ToInt32 are used to convert string into the integer but Only difference between them is to Convert.ToInt32 handle null and returns ‘0’ as output and int.parse is not going to handle NULL and will give a Argument Null Exception. Here is the example for that both are almost same except handling null.

           string convertToInt = "12";
          string nullString = null;
          string maxValue = "32222222222222222222222222222222222";
          string formatException = "12.32";
          int parseResult;
          // It will perfectly convert interger
          parseResult= int.Parse(convertToInt);
          // It will raise Argument Null Exception
          parseResult= int.Parse(nullString);
          //It willl raise Over Flow Exception
          parseResult= int.Parse(maxValue);
          //It will raise Format Exception
          parseResult= int.Parse(formatException);

          //For Convert.ToInt32
     
          //It will perfectly convert integer
          parseResult= Convert.ToInt32(convertToInt);
          //It will ouput as 0 if Null string is there
          parseResult= Convert.ToInt32(nullString);
          //It will raise Over Flow Exception
          parseResult= Convert.ToInt32(maxValue);
          //It will raise Format Exception
          parseResult= Convert.ToInt32(formatException);

Read more: DOTNET JAPS
Posted via email from .NET Info
Delicious Twitter Facebook Digg Stumbleupon Technorati RSS
Links to this post

NHibernate and Mapping Aggregates

0 comments
A few days ago a friend emailed me the following question regarding NHibernate mappings for a solution he’s currently developing:

“I have an idea entity that has a collection of comment entities and I need to get the comment count for each idea. I made a massive mistake at the beginning by calling idea.Comments.Count (even worse, I did it in the view!), which due to the collection being lazy-loaded caused about 10 database calls so performance was sluggish even with second level cache.  I was therefore wondering how you would do it - would you use HQL and use Comments.size or would you do something differently?”
Now, I’ve been pretty busy recently, so before I had opportunity to respond properly, he sent this follow-up:

"After looking for a solution for getting a Comment count back for each Idea, I found using the Nhibernate Formula method does the job - just wanting to make sure I was on the right track in terms of performance etc.  My mapping class is as follows:"

public class IdeaMap : ClassMap<Idea>
{}
}

Read more: Ian Nelson
Posted via email from .NET Info
Delicious Twitter Facebook Digg Stumbleupon Technorati RSS