Santosh 的个人资料Santosh Kumar照片日志列表更多 工具 帮助

日志


Moving a window using outside title bar

Const HTCAPTION = 2
 
Const WM_NCLBUTTONDOWN = &HA1
 
Private Declare Function ReleaseCaptureArea Lib "user32" Alias "ReleaseCapture" () As Long
 
Private Declare Function SendMessage2Window Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
 
Sub Form_MouseDown(Button As Integer, Shift As Integer, xCordinate As Single, yCordinate As Single)
    If Button = 1 Then
       Dim ExitCode As Long
       xCordinate = ReleaseCaptureArea()
       ExitCode = SendMessage2Window(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
    End If
End Sub

 

»»»»»»»   by Santosh Kumar ?

Original @ http://santu4you.spaces.live.com

Oracle, Building a Dynamic SQL Statement

 

Think of a situation where one crash dump of an entire user UsrY is imported into another important user UsrX and you need to delete these unwanted objects now. The problem here is, if the no of objects are many and are not only tables but also views, there will be difficulty to list out the objects manually and generate the ‘drop’ statement. The following statement should be executed in UsrY after importing it separately, and then it can generate dynamic SQL statement that can be used to execute in UsrX.

 

SQL> CONN SYSTEM/MANAGER;
SQL> CREATE USER USRY IDENTIFIED BY USRY;
SQL> GRANT DBA TO USRY;
SQL> HOST IMP
USRY/USRY@ORASID FILE=C:\EXPFILE.DMP FULL=Y
SQL> CONN USRY/USRY;
SQL> SELECT 'DROP '||TABTYPE||' '||TNAME||';' EXECUTE_THESE_IN_USRX FROM TAB;

 
»»»»»»»   by Santosh Kumar ? Original @ http://santu4you.spaces.live.com