November 5, 1999

Disabling the Command Window

Question: I have compiled a program as an .APP file. When I run this file from VFP 6, I would like to disable the close button until the user clicks on the Cancel button. I would also like to make the command window invisible or disabled when that .APP program

Incorrect IP Lookup

Question: I have an application which uses dialup networking. If I connectafter starting my application, InetAddress.getLocalHost() alwaysreturns 127.0.0.1. Even if I connect before starting up,then disconnect and reconnect, the IP address I was assigned onthe first connection by PPP is returned and not the new one.Why is this happening? Answer:

Servlets vs. Applets

Question: We currently use applets to allow users to access a database,but are looking for ways to improve performance. Is a servlet-basedsolution faster than an applet-based solution? Answer: This will depend on the application, the number of concurrentclients, the average network latency and bandwidth between a client andthe server, and

Method Storage

Question: Does each instance of a class have its own copies of instance methodsin the same way it has its own copies of instance variables? Answer: Every time you instantiate a class, new memory is allocated to storethe object. Part of this storage includes space for copies of itsmember variables.

Attaching a DataGrid Control to ADO

Question: How can I use ADO and DataGrid (OLE DB) control in a VFP form? This code does not work in VFP as it works in VB 6.0: DataGrid1.DataSource=mADORecordset1 Answer: The Datagrid object cannot be attached to a “forward-only” ADO recordset. The type of recordset is set with the CursorType

Unexpected Socket Close

Question: How do you determine when a client has closed its socket, so that aserver can cease to wait for messages from that client? Answer: When a socket endpoint closes its socket, a read on the InputStreamat the other end will return -1, indicating end of file. If theprocess crashes,

Backspaces and Form Focus

Question: I have two questions: When using the Backspace key to delete content in a text box, the control is passed to the preceding text box once all data is erased. Can this be disabled? When calling one form from another, the form to be loaded doesn’t receive the focus;

VB Web Components and MTS Security

Question: We’ve developed a human resources system based on the principles advocated by Rockford Lhotka in VB6 Business Objects. We used a SQL 7.0 database and stored procedures in conjunction with ActiveX Data Objects (ADO) in the data services tier. We implemented security on the system as part of the

No more posts to show