July 6, 2000

Multiple Entries That Meet Criteria

Question: How can I pull just the first match to a query? We have a database of jobs in process: jobno 12345op# 10 shear %complete 100op# 20 punch % complete 90op# 30 deburr %complete 0op# 40 timesave %complete 0jobno 67890op# 10 shear %complete 100op# 20 punch % complete 100op# 30

ADO with Stored Procedures

Question: How do I get both output parameters and output recordsets from the SQL7 stored procedures I call from ASP via the ADO command object? Answer: It is possible to return both data in output parameters and a recordset. Here’s the VB/ADO code to create Command and Recordset objects and

Client Caching of Java Server Pages

Question: When I redirect a request from a Servlet to a JSP, the browsercaches the JSP and won’t display an updated page without reloading.How do I prevent the page from being cached? Answer: The HTTP/1.1 specification specifies a header called Cache-Control,that can be used to alter the caching behavior of

Sqlhosts

Question: Why when I try to run sqlexecd to set up ODBC do I get an error: -25553 unable to load locale categories. Answer: Check your environmental variables. If you cannot get the local/gls info, the variables aren’t right. Try logging in as informix and see what happens.

Get Date by Totaling All Seconds

Question: How do I get the total number of seconds between two dates? Answer: You can use the DATEDIFF function to calculate the difference between two dates. The value can be returned in years, quarter, months, days, weeks, minutes, seconds and so on. This syntax returns the difference between today

Database Property

Question: How do I programmatically change the database property of Forms so that I can put my data files anywhere? Answer: You can set the database properties of cursors in the dataenvironment of forms from the BeforeOpenTables method of the dataenvironment: this.cursor1.database = SYS(5)+CURDIR()+”test2.dbc”

Threading and SimpleDateFormat

Question: Is SimpleDateFormat threadsafe? I am trying totrack down a bug where a date formatted “yyyy-MM-dd” actually came outas 2000-06-0001. I have four threads accessing the format method ofmy date formatter class at approximately the same time. Answer: SimpleDateFormat is not threadsafe. The general rule to follow isthat if the

NT Admin

Question: Can I move 600+ users from a standalone server to a PDC with all rights and information intact, without having to recreate the users on the PDC? Answer: Well, there might be an easier way with a third-party utility, but you can partially accomplish your purpose with a couple

Using the VFP Grid Without Bound Data

Question: Is there anything similar to the “Microsoft grid control” in Visual Basic that just displays a grid and does not bind data from a table? Answer: You could use the VFP Grid control and attach it to a VFP cursor. When it is time to save to tables, just

No more posts to show