March 10, 2004

WebRequest & WebResponse

There are two methods to send info and get a response via HTTP. The second (alternate) method works for both .NET and VB6, but it requires DLL reference (take your pick between these methods&#151which one is better really just depends on your priorities). Method 1: Dim strXml As StringstrXml =

The #define Directive

When you compile a program the compiler first uses a preprocessor to analyze the code. The #define directive can be used to either define a constant number or function or to replace an instruction in your code. For instance: #define for_ever_do while(1) This means you can use for_ever_do instead of

Print an Error Report with NotePad

The following code prints out an error report to NotePad. Private sub cmdPrintError_Click Dim curDB As Database Dim rs As Recordset Dim lSQL As String Dim retVal As Variant Open “C:Database xtValidate.txt” For Output As #1 Print #1, “Company to Validate:” & ” ” & Me.txtCompany Print #1, “” Set

Retrieve the rowCount Without Looping

Use this code to obtain the rowcount in JDBC without looping through the resultset. try { // Create a scrollable result set. stmt = conn.createStatement( ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); // Set a string with the query sqlString = “SELECT …..”; rs = stmt.executeQuery(sqlString); // Point to the last row in resultset. rs.last();

Grant SQL Execute Permissions to a User

Oftentimes, when I’m creating stored procedures, I forget to grant execute permissions to my user(s). Here is a stored procedure that will do this for you by simply passing in the username or a comma delimited list of users. Want to revoke permissions? Replace GRANT with REVOKE! CREATE PROCEDURE GrantExecuteForUser(@user

Taking the Enterprise Mobile: Developer Roundtable

n February, DevX Editorial Director Michael McCarthy and Editor-in-chief Lori Piquet sat down with four developers?two in the U.S. and two in Europe?to discuss the mobilization of the enterprise. Why don’t we have more choice in enterprise applications? Why is all the choice on the consumer side? Do the carriers

Avoid the 9 Common Flaws of Unportable Mobile Java Apps

ith an estimated 100 million Java-enabled handsets on the market today?a number projected to grow to 1 billion by 2006?it’s clear that the opportunity for wireless developers is enormous. However, since there are more than 200 different Java-enabled mobile handsets and an international market requiring multiple language support and mobile