Friday, June 29, 2012

Installshield - Showing Progress bar in Custom Dialog

Installshield - Showing Progress bar in Custom Dialog
 We can use any one of the below constant for showing progress bar in the custom dialgo

 Enable(STATUS) - Displays the progress indicator (status bar) with cancel button in the bottom.


 Enable(STATUSDLG) - Displays the progress indicator (status bar) with cancel button in the bottom and  the dialog is custom skin enabled

 Enable(STATUSEX)  - Display of the progress indicator (status bar) in the standard Setup Status dialog (Normal dialog size).

 Enable(STATUSOLD) - Displays the progress indicator (status bar) without cancel button.


Wednesday, June 27, 2012

How to resolve the specified module could not be found error

How to Resolve ASP.NET Runtime error :"the specified module could not be found"

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I have faced this error when i deployed an asp.net application in one of my machine. The same source code is working in another machine which has the same configuration.

Finally i could resolve this issue with following the below step:
1. I completely removed all the dll from the virtual directory leaving only the startup dll.
2. Now i browsed the application and the startup page loaded succesfully.
3. I keep adding the dll one by one opened the application and checked.
4. When i add 'Microsoft.SqlServer.Replication.dll' and try opening the application i got the "the specified module could not be found" error.
5. Now we have found the source file which causes the error.
6. Using the dependency checker, i tried to check the dependency of  'Microsoft.SqlServer.Replication.dll' and found one dll missing. Finally i copied the missing dll from the machine where the application is working and moved into this new machine.

The issue got resolved.

Saturday, June 2, 2012

Export to Text File directly from SQL Query

Export to Text File directly from SQL Query

EXEC xp_cmdshell 'bcp "SELECT * FROM Customer" queryout "C:\bcpcopy.txt" -T -c -t,'

Where -T says Trusted connection. Instead of thus we can use -U & -P for specific account
the character after t indicates the field delimiter. Here it is ,(comma)

For more options on BCP here: http://msdn.microsoft.com/en-us/library/ms162802.aspx