Translate

Tuesday 26 March 2013

SQL Query tips

Pivot Table:


SELECT empid , [Basic], [TA],[DA]
FROM (
SELECT empid, wage, amount
FROM yourtable) up (alias name)
PIVOT (SUM(amount) FOR wage IN (basic, ta,da)) AS pvt
ORDER BY empid
GO
Sample format
empid    wagecode    amount
  1      basic       1000
  1      TA           500
  1      DA           500
  2      Basic       1500
  2      TA           750
  2      DA           750
Desired output:
empid   basic    TA    DA
  1     1000     500   500
  2     1500     750   750

Page redirect and return to calling page without redirect from called page



Page redirect and return to calling page without redirect from called page

SHDocVw.InternetExplorer IE = new SHDocVw.InternetExplorer();

object Empty = String.Empty;
                object URL = "http:59.181.45.765/Test_project/search/tabSearch.do?method=init";
                IE.Visible = true;
                IE.Navigate2(ref URL, ref Empty, ref Empty, ref Empty, ref Empty);
                while (IE.Busy == true || IE.ReadyState != tagREADYSTATE.READYSTATE_COMPLETE)
                {
                    System.Threading.Thread.Sleep(5000);
                }
             
                IE.Visible = false;



VB.Net

http://go4answers.webhost4life.com/Example/hide-browser-control-115441.aspx

Follwinig Error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154



solution link:

http://www.codeproject.com/Questions/257802/VB-NET-Error-Retrieving-the-COM-class-factory-for

http://go4answers.webhost4life.com/Example/unable-access-events-htmldocuments-184929.aspx

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22705179.html

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22705179.html

http://www.vbforums.com/showthread.php?694125-RESOLVED-VB6-Webbrowser-Compatibility-with-Internet-Explorer-8

http://stackoverflow.com/questions/5643819/developing-internet-explorer-extensions

> I have vb.net application which is 32 bit and need to transfer to 64bit
> windows. It cannot run. How can I do to make it work??



works for _pure_ managed apps:

compile with VB 2005 using Target CPU = 'AnyCpu'
http://msdn2.microsoft.com/en-us/lib...z2(VS.80).aspx

On 64 Bit Windows (x64) install runtime
http://www.microsoft.com/downloads/d...b-40e78d788b00


If you are using any COM-Interop/PInvoke/other components,
verify all their compatibility with 64-Bit.


http://howtostartprogramming.com/vb-net/vb-net-tutorial-51-httpwebrequest-post-method/


http://www.dotnetfunda.com/forums/thread7355-sending-sms-using-aspnet-and-csharp.aspx

http://www.codeproject.com/Questions/455163/A-connection-attempt-failed-because-the-connected