September 14, 1999

Determine if a Form is Open

Question: I have this real cool function to determine if a Form is Open which works fine in Access 97, but not in VB 6.0 because it does not support the SysCmd function. I wonder if there is a way to convert it so that it also works in VB

Retrieving the Greatest Value from a Group

Question: I have a table like this one: Day_Period_Money (daydate date, period number, amount number); Here is an example of some data: daydate period amount01/01/99 1 1001/01/99 2 2001/01/99 3 1501/02/99 1 3001/02/99 2 2501/02/99 3 20 How do I get the largest amount for each day with the period?

Returning a Certain Number of Rows

Question: How do I get a query to return only a certain number of rows? For instance, a search criterion might return 100 rows, but I only want to see them 25 at a time. I know this was possible when I was messing with Oracle a year and a

NullPointerException

Question: Since there are no pointers in Java why is there aNullPointerException? Answer: It is a bit misleading to say that Java does not have pointers.Reference variables are very similar to automatically dereferencedpointers, but act in a safer manner. It is more accurate to say thatJava does not support pointer

Removing a Duplicated Item

Question: I have tried the following code: SELECT distinct title, id from table where …..order by title and it returns: A 001A 002B 003 The result I want is: A 001B 003 or A 002B 003 Item A is duplicated for storing extended detail. How can I make that work?

Creating a Schedule Timetable

Question: I have a table with five columns. They are “No. of People,” “Tour1,” Tour2,” “Tour3,” and “Tour4.” I want to set up a query that shows me how many people went to each tour by date. My input table looks like this: No. of People Tour1 Tour2 Tour3 Tour43

Inactivity Timeout

Question: I’d like incorporate an inactivity timeout for an application.When there is no mouse or keyboard activity in the application fora certain period of time, I want to close all the windows and dialogsof the application. Answer: The easiest way to implement an inactivity timeout is to keep track ofthe

Answering SQL Queries in Excel

Question: I’ve got an Excel workbook composed by a series of pages (worksheets). One of them is called ‘Wholesales’. I’ve tried to retrieve values even with basic syntax: select * from Wholesales but with no result. What is going on? Answer: Excel does not answer SQL queries like this. If

Inserting Images to SQL Using a SP and N-tier App

Question: I am in the process of creating an n-tier database application and am stuck at storing images to the SQL Server database. Any help would be appreciated. Obviously, I need to read the image from the hard drive and store it to a variable (of what type?), and then

No more posts to show