devxlogo

Tip Bank

Optimize Oracle’s SQL Statement Cache

When Oracle receives a SQL statement to execute, it first looks to see ifthe execution plan already exists in its cache. If the statement does existin the cache, the previous

Move a Form by Clicking Anywhere on It

The following code allows you to move a form by clicking anywhere on the formand dragging it: Option Explicit’define module level variables to store the last position of the form,

Counting “Live” Instances of a Class

Counting the number of object instances of a certain class can be necessary in debugging and performance tuning. To do that, declare a static data member as a counter, and

Fix Single Quotes in a SQL Statement

The following will replace all single quotes in a SQL statement [CHR(39)] with anapostrophe [CHR(180)]. This is useful if you are trying to add names to adatabase as parameter values

How Many Digits Does a Floating-Point Variable Have?

The standard function template std::numeric_limits (defined in < limits >) returns the implementation-dependent number of digits that a certain type has: #include int main(){std::numeric_limits < float >::digits10; //6 on my

Roles Are Disabled at Package Compilation Time

When granting permissions through roles, it is important to know that rolesare disabled while packages are compiled. For example, consider two schemas: User_A and User_B. Let’s create Role_A: CREATE ROLE

Project Reference

Question: In a code I’m developing, I am getting a “can’t find project or library” error message when it gets to the following functions: Chr(), Right(), Left(). Aren’t these VB