The Latest

DevX - Software Development Resource

Factorial – The factorial of a number

‘ The factorial of a number” if NUMBER is negative or >170 it raises an’ “subscript out of range” errorFunction Factorial(ByVal number As Long) As Double Static result(170) As Double

DevX - Software Development Resource

GCD – The Greatest Common Divisor of two integers

‘ the Greatest Common Divisor of two integers’ (it uses the Euclide’s algorithm)’ if either argument is zero you get a “Division by Zero” errorFunction GCD(ByVal n1 As Long, ByVal

DevX - Software Development Resource

Rnd2 – A random value in a range

‘ A random number in the range (low, high)Function Rnd2(low As Single, high As Single) As Single Rnd2 = Rnd * (high – low) + lowEnd Function Related Posts AI

DevX - Software Development Resource

Fract – The fractional portion of a number

‘ The fractional part of a floating-point number’ note that negative numbers return negative valuesFunction Fract(number As Variant) As Variant Fract = number – Fix(number)End Function Related Posts Report: More

DevX - Software Development Resource

Log10 – Base-10 logarithm

‘ Base 10 logarithmFunction Log10(number As Double) As Double Log10 = Log(number) / 2.30258509299405End Function Related Posts IBM Bluemix Adds New DevOps ServiceMicrosoft Reorganizes, Combines Windows and Devices GroupsWhat Happened

DevX - Software Development Resource

Randomly Retrieve Records From a Database

Question: I would like to display a “Quote of the Day.” In order to do this, I need to retrieve the numbers of records in a recordset and then randomly

DevX - Software Development Resource

Obtaining @@Identity with VBScript and ADO

Question: Using VBScript, how can I use the @@Identity SQL Statement to set the keyfield of a record just entered to a variable? Answer: You can issue multiple SQL statements

DevX - Software Development Resource

Looking for Snip.exe to (Un)register Components

Question: I’m looking for a copy of snip.exe. This program registers/unregisters components/DLLs under a given directory. Answer: I don’t know about SNIP, but how about an even easier method? Copy

DevX - Software Development Resource

File Security Under NT/2000

Question: I am trying to back up my server, but there are no freeware products that will save the ACLs off the files on the backup. Tape backup is not

DevX - Software Development Resource

Selecting into a Variable Using Dynamic SQL

Asking how to select into a variable using dynamic SQL is a frequent question on newsgroups because SQL Server will not let you select into a variable using the EXEC()

DevX - Software Development Resource

Using OUTER , WHERE or Simply JOIN

Question: Does it make a difference in placing an OUTER or simply a JOIN or a WHERE? Using WHERE: select tb01_field01,tbl01_field02 from tb01,tb02 where tb01_field01 = tb02_field01 Using JOIN: SELECT

DevX - Software Development Resource

Deleted E-mails

Question: Is there any way to recover e-mails deleted from Exchange through Outlook 2000? Answer: Yes, if you have Deleted Item Recovery enabled. If you do, you should see a

DevX - Software Development Resource

Exchange Administrator Program

Question: What file extensions do I need to copy to a NT Workstation in order to install the Exchange Administrator Console? Answer: Let’s not make life any more difficult than

DevX - Software Development Resource

Convert Time for Numbers

Question: Does Informix have a function that converts datetime chars for numbers? Answer: Datetime is stored internally as an integer that represents the number of seconds from a certain starting

DevX - Software Development Resource

Year-Ago-Today Date Function

Question: In Access, I can get the date that was this day of this week a year ago (i.e., if today is Monday, 5/15/00, a year ago was Monday, 5/17/99)

DevX - Software Development Resource

SQL Stored Procedure Problem

Question: I am writing a SQL statement that dynamically dumps the databases on the SQL servers. However, when I run the procedure as a stored procedure it falls out of

DevX - Software Development Resource

Date Insertion Format

Question: I am using VB6 with ADO 2.1. I am trying to insert a date value into a column that is of the Date datatype. I am receiving a date

DevX - Software Development Resource

Informix Error Logging

Question: Does Informix keep a log of runtime errors? If it does, where can I find it? Answer: Yes. It’s probably in your $INFORMIXDIR, but it does not have to

DevX - Software Development Resource

Record Locking

Question: Can I find information regarding the user and 4GL program or process that is locking an SE database record? I am using SE 5.08. Answer: I’m not sure about

DevX - Software Development Resource

Informix Version 7 SQL Query

Question: How do I find the top n records within a table for version 7? I have seen some similar SQL queries but cannot adapt them to version 7. Answer:

DevX - Software Development Resource

Floating Point Arithmetic Myths

In the olden days, the use of floating point numbers imposed a significant computation and speed overhead compared to integer arithmetic. For this reason, many optimization guidebooks and IT veterans

DevX - Software Development Resource

Better Alternatives to a Custom Memory Manager

Some applications have special memory requirements. For example, they allocate large amounts of memory at once and then use it in parts, or they allocate only objects of the same

DevX - Software Development Resource

What’s in a Byte?

Many believe that a byte is by definition, an eight-bit data unit. Technically, this definition isn’t correct. A byte is a data unit with an unspecified number of bits. Indeed,

DevX - Software Development Resource

Adding a New Record to ADO

Question: I know there are two ways to insert a new record. One way is to execute a Insert statement, the other way is use the recordset.AddNew method. In terms