
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
‘ Copy a BLOB field’s contents to a binary file.Sub BlobToFile(fld As ADODB.Field, filename As String, _ Optional ChunkSize As Long = 8192) Dim fnum As Integer, bytesLeft As Long,
When a class has Thread entry functions, it is usually declared as static member functions of the class as in the example below: Class A{private: int i,j,k;public: //Thread Entry function
Suppose you have a thread function ThreadFunc in a class CMyClass and you want to access a member of that class. Here’s what to do: Declare the thread function as
#include void main(){ char cBuf[96]; float fVar=5.678; int nVar=78; //Conversion from float to char* sprintf(cBuf,
Let’s start with a code fragment: Statement stmt;Connection con;Class.forName(
Many times in DB programming, a situation occurs when one operation, depends on the result of the other, but there is no way to communicate that result to the first
It’s common when working with dates to be able to determine the last date of a particular month. I’ve seen solutions to this problem that range from using arrays or
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.
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
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
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*
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.
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
It is unfortunate that VB5 does not provide a quick way to check if an item with a certain key exists in a collection. This results in errors if an
Whenever a thread is created in a program, it is unknown when it will execute. This means there may be cases where the parent program has finished but the thread
This is a fast, efficient way to make a split function. For longer strings, performance can be improved by enlarging AllocUnits. Public Function Split(strText As String, _Optional Byval Delimited As
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.
Suppose you have an abstract class MyAbstractClass with an abstract method do(): abstract class MyAbstractClass {abstract void do() ;} Of course, some classes inheriting from MyAbstractClass can be redefined with
You can establish a link to the remote SQL Server using this code: Sp_addlinkedserverSyntax :SP_addlinkedserver[@Server]=’server'[,[Srvproduct=]’product_name'[,[@provider=]’provider_name’][,[@datascr=]’data_source’][,[location=]’location'[,[@provstr=]’Provider_string'[,[@catalog=]’catalog’]server: Name of the linked server to createproduct_name: Product name of te OLE DB data sourceProvider_name:
Write the following code, compile it, then try to run it: class TstApppublic static void main (String args[])Next_Level(args[0]);}public void Next_Level(String Incoming_String)System.out.println(Incoming_String);}} It is very simple code but it will not
The lastModified() method in java.io.File returns a long datatype. Thislong datatype represents the date and time when the file was last modified.The value does not carry any usage unless it
Counting the occurrences of a string can be useful when you
Associate a label that describes what the text box is meant for.For example, a label with the caption ‘Name’ would be a good pair for a text box wherein you
evelopers have been requesting that Microsoft add more threading functionality to VB for some time?it will finally happen with VB.NET. VB6 does have support for building multithreaded EXEs, DLLs, and
QL Server provides many sophisticated functions to calculate dates. But knowing how to use them can often be a challenge. Suppose you want to calculate when a package is due
ecently I encountered a couple of Oracle-tuning projects that required me to evaluate the performance of PL/SQL and SQL code. I had to generate a substantial amount of data from
fficient coding practices are hard to develop and even harder to maintain. Most likely, your coding process suffers from one of two problems: Your code throws an exception or otherwise
onsider the scenario in which you are building a Web application that displays events or appointments for different dates. If you want your users to remember this event within their
ML is becoming increasingly popular in the developer community as a tool for passing, manipulating, storing, and organizing information. If you are one of the many developers planning to use
he XML parser world is a dynamic one. As standards change, the parsers change as well–XML parsers are becoming more sophisticated. For most programming projects, the parser, at minimum, must











