The Latest

DevX - Software Development Resource

RecordCount Property-ADO

Question: How do I get the rowseffected from the execute method of an ADO command object?The code I’ve written is: Dim Cn as New ADODB.ConnectionDim Cmd as New ADODB.CommandDim Recordset

DevX - Software Development Resource

Distribution List E-mail Stuck in Outbox

Question: When I try to send e-mail to the distribution list, it gets stuck in outbox. What should I do? Answer: I’d start by verifying that all of the addresses

DevX - Software Development Resource

Counting Duplicate Rows

Question: How do I count the number of duplicate items in a table? Answer: Lets break down your question into several steps.First, let’s create a sample table using the following

DevX - Software Development Resource

Creating Tables in a Stored Procedure

Question: Can I create a table in a stored procedure named from a parameter? Answer: You can dynamically create tables with variables, but you need to create a string and

DevX - Software Development Resource

How to Initialize an Array

Question: How do you initialize or assign values to an array in a class? Answer: The short answer is that you can’t initialize an array member as you would initialize

DevX - Software Development Resource

NT Backup While Exchange Is Running

Question: Can I use NT Backup to get a complete backup of PRIV.EDB and PUB.EDB while Exchange is running? Answer: NT Backup is Exchange-aware so you do not need to

DevX - Software Development Resource

Error Handling Routines

Question: While converting source code from C to C++, I came up with difficulties in converting error handling routines like err_quit(),err_sys(),etc. Are there C++ versions of these functions and where

DevX - Software Development Resource

Indirection Operator

Question: Can you use the indirection operator like a memcpy to copy the contents of a structure like this? *m_pMyInfo = stMyInfo; Or should you use the memcpy function? memcpy(m_pMyInfo,

DevX - Software Development Resource

Synchronized Method Overhead

Question: I am interested in keeping my code running as fast as possible. Is there a cost associated with making my methods synchronized, and if so, how significant a cost?

DevX - Software Development Resource

Outlook Meeting Requests

Question: Is there a way to turn off meeting requests for a user? Is there a way to turn off the “feature” that sets a tentative meeting when you open

DevX - Software Development Resource

Informix Data Types

Question: Does Informix support user-defined data types? Answer: OWS/IDS does not support custom data types. This is supported in the 9.X series and in the new Internet Foundation 2000 and

DevX - Software Development Resource

Synchronizing Workstation Clocks

Question: How do I synchronize all the Workstation clocks of a 100+ user community to the same reference? Answer: For NT 4.0, you can use the TimeServ.EXE, which is found

DevX - Software Development Resource

Mail Access from Handheld

Question: Does OWA in Exchange 2000 have a feature for accessing e-mail through a handheld? Can I just type in the URL and retrieve my inbox? Answer: If only it

DevX - Software Development Resource

Use “.equals” in Place of “==”

Java provides two methods to test for equality: the == Operator and the .equals method. The .equals is implemented by all objects. Most programmers tend to use == for equality,

DevX - Software Development Resource

Check whether RAS is installed

When you work with RAS APIs, you should have to make sure if RAS library is installed on the system. A simple way is to verify the existence of the

DevX - Software Development Resource

EnumRASEntries – Enumerate all available RAS phone-book entries

Const ERROR_SUCCESS = 0&Const ERROR_BUFFER_TOO_SMALL = 603&Const RAS_MaxEntryName = 256Private Type RASENTRYNAME dwSize As Long szEntryName(RAS_MaxEntryName) As ByteEnd TypePrivate Declare Function RasEnumEntries Lib “RasApi32.DLL” Alias _ “RasEnumEntriesA” (ByVal reserved As

DevX - Software Development Resource

Delete a User in NT

Question: How do I delete a user in NT with the API’s? Answer: The code below shows how to delete a user (if the server name is blank, it attempts

DevX - Software Development Resource

Setting the off-line mode

You can programmatically set the Internet Explorer off-line mode with the InternetSetOption API, as this code snippet demonstrates: Const INTERNET_OPTION_CONNECTED_STATE = 50Const INTERNET_STATE_CONNECTED = 1Const INTERNET_STATE_DISCONNECTED = 2Const INTERNET_STATE_DISCONNECTED_BY_USER =

DevX - Software Development Resource

Check whether the user is working off-line

Internet Explorer offers the possibility to simulate an Internet connection with the off-line mode. If you want to know if off-line mode is on or off you can use InternetQueryOption

DevX - Software Development Resource

An enhanced VB DatePart function

Here is an enhanced version of VB DatePart function: the first parameter is now an enumerated type, so easier to use. DatePartEx is 4-5 times faster than DatePart and supports

DevX - Software Development Resource

The CopyProc Add-in

This add-in breaks up the selected VB component’s code and prepares a list of all the procedures(Subroutines, Functions, Property Procedures and the Declaration section). You can select the methods and

DevX - Software Development Resource

GetNumLockKey – Get the state of the NumLock key

Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey As Long) As _ Long’ Get the current state of the NumLock keyFunction GetNumLockKey() As Boolean GetNumLockKey = GetKeyState(vbKeyNumlock)End Function Related Posts

DevX - Software Development Resource

SetScrollLockKey – Set the state of the ScrollLock key

Private Declare Sub keybd_event Lib “user32” (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey

DevX - Software Development Resource

PressVirtKey – Press and/or release any key

Private Declare Sub keybd_event Lib “user32” (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey

DevX - Software Development Resource

SetNumLockKey – Set the state of the Num Lock key

Private Declare Sub keybd_event Lib “user32” (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey

DevX - Software Development Resource

SetCapsLockKey – Set the state of the Caps Lock key

Private Declare Sub keybd_event Lib “user32” (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey

DevX - Software Development Resource

GetInsertKey – Get the current state of the Insert key

Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey As Long) As _ Long’ Get the current state of the Insert keyFunction GetInsertKey() As Boolean GetInsertKey = GetKeyState(vbKeyInsert)End Function Related Posts

DevX - Software Development Resource

GetScrollLockKey – Get the state of the Scroll Lock key

Private Declare Function GetKeyState Lib “user32” (ByVal nVirtKey As Long) As _ Long’ Get the current state of the ScrollLock keyFunction GetScrollLockKey() As Boolean GetScrollLockKey = GetKeyState(vbKeyScrollLock)End Function Related Posts