devxlogo

The Latest

Delete Duplicate Rows in a SQL Table

There are times when duplicate records somehow creep into a table despite your best efforts. This happens more in cases where data is loaded into table from other sources because

Use of LIKE in SQL

The LIKE statement is often used in SQL queries with wildcards to find data that issimilar to a matching pattern. PL/SQL has two forms of wildcard: _ and %. The

Retrieving the Top-N or Bottom-N Rows from a SQL Table

You often encounter requirements for reports to retrieve the top-n/first-n rows of a table Related Posts Perform Connectionless Communication Between Producer and ConsumerMicrosoft’s Azure Search Becomes Generally AvailableComponent-based JavaScript Development

Transaction Independence in Oracle8i

In a nested procedure environment, I have often felt the need to isolatethe transactions of the child/called procedure from the parent/calling procedure’s transactions. Until Oracle8i, it used to be a

Use Style Sheets to Create Floating Text

Use Cascading Style Sheets to create a floating text paragraph. First, add the attribute in the document’s section: Now, add the content you want to display in the window: Visit

Reading From an Excel File

Question: Is there a way to store data in an Excel file from an ADO recordset by doing some sort of block read/write instead of reading/writing every data field in

Date Subtraction

Question: I have a date field store in one of my database tables. How do I pull a record from that table within seven days of today’s date? today’s date

Using PL/SQL in VFP or SQL Server

Question: Can I use Oracle’s PL/SQL in Visual FoxPro or SQL Server 6.0? Answer: No. PL/SQL is a language native to Oracle, not Microsoft’s products. Each Microsoft database product has

DeleteRegistryValue – Delete a value from the Registry

Private Declare Function RegDeleteValue Lib “advapi32.dll” Alias _ “RegDeleteValueA” (ByVal hKey As Long, ByVal lpValueName As String) As LongPrivate Declare Function RegOpenKeyEx Lib “advapi32.dll” Alias “RegOpenKeyExA” _ (ByVal hKey As

GetRegistryValue – Read the value of a Registry key

Private Declare Function RegOpenKeyEx Lib “advapi32.dll” Alias “RegOpenKeyExA” _ (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _ ByVal samDesired As Long, phkResult As Long) As

CreateRegistryKey – Create a key in the Registry

Private Declare Function RegCreateKeyEx Lib “advapi32.dll” Alias _ “RegCreateKeyExA” (ByVal hKey As Long, ByVal lpSubKey As String, _ ByVal Reserved As Long, ByVal lpClass As Long, ByVal dwOptions As Long,

SetRegistryValue – Write a value in the Registry

Private Declare Function RegOpenKeyEx Lib “advapi32.dll” Alias “RegOpenKeyExA” _ (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _ ByVal samDesired As Long, phkResult As Long) As

DeleteRegistryKey – Delete a key of the Registry

Private Declare Function RegDeleteKey Lib “advapi32.dll” Alias “RegDeleteKeyA” _ (ByVal hKey As Long, ByVal lpSubKey As String) As Long’ Delete a registry key” Under Windows NT it doesn’t work if

GetRegisteredUser – Retreive the name of the registered user

Private Declare Function GetVersion Lib “kernel32″ () As LongConst HKEY_LOCAL_MACHINE = &H80000002′ Return the name of the registered user” Requires the GetRegistryValue functionFunction GetRegisteredUser() As String Dim regKey As String

Determining the Top Level Frame

Question: I have developed a custom AWT component that can be placed at any level in a component hierarchy. How can it determine the top level Frame in the hierarchy?

Enumerating Methods of a Class

Question: How can I enumerate the methods of an object? I know there must be away since JBuilder and other IDEs know how to populate a list ofmethods from a

Select All Checkboxes

Question: I have several checkboxes and I want one checkbox tocause all of the checkboxes to be selected when it is selected. Howcan I do this? Answer: Even though the

JPasswordField

Question: How do I access the contents of a JPasswordField to see if it matcheswith the correct password? Answer: Before using a class, it helps to examine all of the

SystemCalls

Question: Is there any method (MFC, Win32) to get the contents of the systemvariable “PATH”? Answer: Sure there is. Use the standard function getenv() for this purpose: #include { char

Mouse Click Coordinate

Question: I know how to detect a mouse click with a MouseListener, but how doI obtain the coordinates associated with the click? Answer: If you already know how to detect

Database Field Types

Question: How do I get a string representation of a database field using JDBCregardless of its type? In other words, I have to use the getInt(),getDate(), getString(), etc., to get

RE: Date Arithmatic in Java

Question: I previously asked a question that may not have been worded as clearlyas possible and you answered something slightly different from what Iwas looking for. I want to know