Tip Bank

DevX - Software Development Resource

Encrypting Stored Procedures

When creating stored procedures, there will be occasions where a certain procedure definition should not be viewed. Using the WITH ENCRYPTION clause stores the procedure definition in an unreadable form.

DevX - Software Development Resource

Encrypting Database Views

Using the WITH ENCRYPTION clause when creating views ensures that they remain secure by keeping the view definition hidden. Sample code:————— Create view Procedure ————–create view

DevX - Software Development Resource

A Beginner’s Checklist

Beginners and even experienced programmers who switch to a new compiler suddenly discover that their programs don’t compile anymore. Sometimes the programs compile but produce numerous warning messages. In most

DevX - Software Development Resource

MS Default Pointer Value

Don’t forget that MS compiler initiates pointers with 0xCCCCCCCC value. In this case: void *p; … //do something here… if (p!=NULL) delete p; // Memory violation The right way void*

DevX - Software Development Resource

Different Uses For Sizeof Operator

Sizeof is a useful operator because it reports both the amount of memory that data items take and the number of bytes that data types. For instance: cout

DevX - Software Development Resource

I/O Formatting With Stringstream

The sprintf() function isn’t type-safe, it doesn’t support user-defined types and it’s a common source of buffer overflow bugs. In C++, there’s a better alternative to sprintf(), namely stringstream objects.

DevX - Software Development Resource

Extract the Extension of a Filename

Extracting the extension of a filename is a requirement in many file searches and file I/O related applications. A simple way to do this is to use the split function.