
Running DOS Commands in SQL Server Query Analyzer
If you run this statement In SQL Server Query Analyzer: EXEC master..xp_cmdshell ‘dir *.exe’ You will get the result as DOS DIR Command. Using this, you can run all DOS

If you run this statement In SQL Server Query Analyzer: EXEC master..xp_cmdshell ‘dir *.exe’ You will get the result as DOS DIR Command. Using this, you can run all DOS

The following functions are used to extract the character in the string to the left or to the right. Left(), Right() functions are not available in Javascript. function Left(str, n){

You may encounter a situation where you need to open a “Save As” dialogue box for downloading files of different types on to the client machine. You might have found

Below is a VB Script example of how to validate an email address using Regular Expressions: Related Posts Khamenei calls for stricter internet regulationOracle Buys StackEngine, Builds Cloud Computing Facility

Import the complete path of the following files in your application using the #import statement: MSO9.DLL msoutl9.olb HRESULT hr;CComBSTR inputStr;inputStr = CString(“MAPI”).GetBuffer(0);CoInitialize(NULL);Outlook::_ApplicationPtr xyz(“Outlook.Application”);_bstr_t name(inputStr, true);Outlook::_NameSpacePtr nsp = xyz->GetNamespace(name);CComBSTR cTo =

There will always be situations when you need to insert a record in a table, but the data needs to be collected from other tables present in the database itself.

The Indexing Service should be started before using the following code.The File content search relies on the Microsoft OLE DB Provider for the IndexingService. The following query lists all the

Use this snippet to remove duplicates from a delimited string: DECLARE @mystring varchar(1000), @myword varchar(50),@CachedStringvarchar(2000)set @CachedString=”DECLARE @i int,@j intSELECT @mystring = ‘cat dog fox cat chicken hen goose cat bird

This generic class will help to obtain a deep copy of any object and cast it to the Object Type: public class ObjectCloner{ private ObjectCloner(){} // returns a deep copy

Scheduling recurrent or future events can be a hassle, but the Timer class can make it a lot easier. With a couple of simple calls, you can create any number

If you want all exceptions to go to the same file, use this code: import java.io.*;import java.util.Date;public class Logger{public static synchronized logException(Exception ex){try {RandomAccessFile ff = new RandomAccessFile(“c:\name.log”,”rw”);// to append

In the code below, inter is an interface which has a method add(int i1,int i2). The implementation is done in Impl class. Interface code(inter.java)public interface inter{ public int add(int i1,int

// conn – having a database connection alreadyPreparedStatement stmnt = null;ResultSet rs = null;try{ // ‘?’ indicates placement of a parameter. stmnt = conn.prepareStatement(“SELECT firstName FROMemployees WHERE salary > ?”);

You can use the printf() function as in the following example: #include using namespace std;int main(){ __int64 i64 = 4294967296; printf(“%I64d “, i64); //in decimal printf(“%I64x “, i64); //in hexa

Suppose you have the class given below: #include #include std::list list_of_pairs; In the above definition, the template argument for list is another template class namely, pair. The above definition won’t

Large graphs are stored as adjacency lists to save space. Traditional mechanisms based on arrays of pointers waste space. The following scheme is based on array of indices, which saves

typedef BOOL ( CALLBACK *REPEATUNTILRELEASECALLBACK )( POINTptScreen, LPARAM lParam );BOOL RepeatUntilRelease( HWND hWnd, REPEATUNTILRELEASECALLBACKfctRepeatUntilRelease, LPARAM lParam, RECT* prtClipping, UINT vk ){ MSG message; ZeroMemory( &message, sizeof(message) ); if ( IsWindow(

You can execute any member function or any other execution after a termination of main() function by using “#pragma exit.”Here’s the syntax: #pragma exit [priority] //withoutsemicolon Now, here’s an example:

Thanks to the SQL Server extensions for the Web and XML, it is now possible to query a SQL Server database (and get the result as XML) as well as

Tip #1: Code for the phone, not the emulator. Handsets are small form factor, constrained devices ? so relative to what you’re used to on the desktop, phones have limited

The .NET framework lets you create two types of “empty” arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set

By default, when an unhandled exception occurs in a managed application, a dialog box appears that asks you whether you want to debug the application with one of the debuggers

The For Each loop always iterates orderly on all the elements of an array or a collection (more precisely, on all the elements of a class that implements the IEnumerable

At times you may need to process elements of an array, a collection, or a dictionary object in random order, for example when sampling a population or (more often) when

You often need to benchmark a piece of code, which you usually do as follows: Dim start As Date = Now’ insert here the code to benchmarkDim elapsed As TimeSpan

You can use XML to transfer both data and commands. In this column I’ll show how you can update a database by means of XML commands sent over the HTTP

The System.Diagnostics.FileVersionInfo class lets you easily read file version information without having to call Windows API functions (as you have to do under previous VB versions). This class has a

If you use Shared members in .NET or modules in VB6, you reduce COM+ context overhead without any risk whatsoever that you will get extra context overhead for that code.

Even though you may want to use some COM+ services, it doesn’t mean that you have to have a unique context for each and every instance. The root instance, that

Instances of configured components, that is, components configured in COM+, get runtime services owing to context objects. When you instantiate a COM+ component, your instance will live in a context