Tip Bank

DevX - Software Development Resource

Changing the Column Name Through StoredProcedure Dynamically

Here’s the syntax for the stored procedure: CREATE PROCEDURE [dbo].[RenameColumn] @tblname as varchar(50), @oldcolnameas varchar(50), @newcolname as varchar(50)ASdeclare @tblColname varchar(100)set @tblColname = @tblname +’.’ + @oldcolnameBEGIN TRANSACTIONSET QUOTED_IDENTIFIER ONSET TRANSACTION

DevX - Software Development Resource

An Alternative to StringTokenizer

Suppose you have a String containing comma-separated substrings. In order to access the substrings individually, you’d normally rely on a StringTokenizer. And if you wanted to put the substrings in

DevX - Software Development Resource

Stop the Flickering

This code stops the annoying flicker often seen when you pack an object with data. Test this code with the controls that bother you most: Private Declare Function SendMessage Lib

DevX - Software Development Resource

Navigate the TRACEs in Your Code

If you put many TRACE’s, in your code, it might be very convenient to jump to each one of them by double clicking a text line in the Debug window.

DevX - Software Development Resource

Granting Permissions on Database Objects

These permissions are required for security reasons USE pubsGOCREATE PROCEDURE GeneralSelect @TableName SYSNAMEASEXEC (‘SELECT * FROM ‘ + @TableName)GO You probably expect that your stored procedure will make a call