I have explained how to store and retrieve image file in SQL Server in my previous post. I received many comments mentioning that how can we store and retrieve doc or pdf or excel (or any type of file) in SQL Server. Few friends (developers) have also posted comment that they receive only 13 byte [...]
Archive for August, 2007
Storing and Retrieving doc/pdf/xls files in SQL Server
Posted in DotNet 2.0, Sql Server, Techincal on August 31, 2007 | 159 Comments »
Great tool for LINQ Query
Posted in DotNet 3.0, Techincal on August 30, 2007 | Leave a Comment »
Joseph Albahari has created a great tool for LINQ query expression. You can dwnload it from here.
Happy Programmig !!
How to use transaction in LINQ using C#
Posted in DotNet 3.0, Techincal on August 25, 2007 | 19 Comments »
I installed VS 2008 beta 2 before few days and started exploring it. I looked in to the LINQ and found very interesting. LINQ generates DataContext class which provides classes and methods which is used in OR-Mapping. You can also use your stored procedures and views with LINQ. You may require to use transaction with your SPs during [...]
Raise event from user control to main page / Event delegation from user control to aspx page in ASP.NET,C#
Posted in DotNet 2.0, Techincal on August 23, 2007 | 25 Comments »
“What is delegate?” we all have faced this question in one or more interview. and the most common answer is “Function pointer”. Here I am showing a simple example of delegate. I have one user control and one aspx page. The user control contains one button. When user click on this button I [...]
Application failed to initialize properly(0xcC000142). Press OK to terminate the application
Posted in DotNet 2.0, Techincal on August 21, 2007 | 7 Comments »
Hi,
I am having a small issue. I am calling a console application from ASP.NET 2.0 website. Below is my code,
string strPassword = Convert.ToString(“Password”);
System.Security.SecureString ssPassword = new System.Security.SecureString();
foreach (char chr in strPassword)
{
ssPassword.AppendChar(chr);
}
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(“Path of EXE”);
info.UseShellExecute = false;
info.Arguments = “ARGUMENTS”;
info.UserName = Convert.ToString(“UserName”);
info.Password = ssPassword;
info.Domain = Convert.ToString(“Domain”);
System.Diagnostics.Process.Start(info);
Fig – (1) code for calling exe [...]
Hide console window in console application
Posted in DotNet 2.0, Techincal on August 21, 2007 | 4 Comments »
As you all know when you execute an console application it will load command prompt and shows out put. There are amny situation in which you do not want this console window to be dislayed to user while your application runing. You can do that by calling some unmanaged functions. I have used following method to do [...]
Viewpoint content is not displayed OR Mime type for Viewpoint content
Posted in DotNet 2.0, Techincal on August 16, 2007 | 1 Comment »
We are using Viewpoint 3-D content in our LMS (Learning Management System). The content is working fine in my local machine. However when I uploaded the LMS on deployment server the contect stopped working. The content loads perfectly. User can listen the sound and can change the step and steps, however 3-D content is not [...]
Generate thumbnail image in dotnet
Posted in DotNet 2.0, Techincal on August 8, 2007 | 9 Comments »
If you have created any e-commerce site, you must have used thumbnail image to display product. You may have seen many sites which display thumbnail image and product description and when user click on image it shows large image of the product. You can do this by uploading two different images for each product OR [...]
Get height and width of image / Generate image object from byte array
Posted in DotNet 2.0, Techincal on August 8, 2007 | 7 Comments »
We are storing image in database in our recent project. We do not store height and width for that image in database. After few months of deployment the client wants to display the height and width of each image while we display image. As we do not store height and width in database we need to [...]
Using the inserted and deleted Tables in SQL Sever
Posted in DotNet 2.0, Sql Server, Techincal on August 1, 2007 | 6 Comments »
DML trigger statements use two special tables: the deleted table and the inserted tables. SQL Server 2005 automatically creates and manages these tables. You can use these temporary, memory-resident tables to test the effects of certain data modifications and to set conditions for DML trigger actions. You cannot directly modify the data in the [...]