 |
|
|
Frequently Asked Questions?
|
 |
 |
 |
 |
| |
| Q. What are the recommended system requirements to run ICS business applications? |
A. OS: Windows XP, Windows Vista and Mac OS 10.x.
Processor: Pentium IV, Duo Core 2 and up
Hard Drive Space: at least 1 GB
At least 1 GB RAM of Memory |
 |
| Q. How can I move data between 4D and other databases? |
A. There are four useful ways to move data between 4D and other databases:
From user mode, choose Import Data or Export Data from the File menu. This will lead you into a dialog which allows you to move data to or from an external delimited text, SYLK or DIF file. Read the section on this feature in the User Reference to learn more.
Use the Import Text, Import SYLK or Import DIF commands from the 4D Language, or their Export equivalents. These very flexible commands work with a 4D layout to allow you to execute code during the import or export of each record. You should be able to import any external file in the three supported formats this way, no matter how much the data needs to be massaged during the import or export. Note that the built-in 4D variables FldDelimit and RecDelimit can be set to whatever character you wish for field and record delimiters during text export or import.
Use the 4D SQL connectivity plug-ins (4D SQL Server, 4D for Oracle, 4D ODBC, or ODBC Driver for 4D Server) to establish a connection between 4D and an external SQL- or ODBC-based data source and send/receive the data through that link.
Write your own import or export routines. Since 4D has full access to external files and serial ports and even to TCP streams, you can read or write any data source you are likely to encounter. 4D developers have implemented programs to read data from bar-code scanners, for example. |
 |
| Q. How can I control page setup? |
A. You will often want to "save" and "load" particular page setups, perhaps for different types of reports which should print landscape and portrait, for example.
The key to doing this is 4D's Page Setup command. 4D associates a page setup with each form. This need not be the page setup used for that form; it is just a convenient place to "save" page setups. To save a particular page setup, open the form you wish to save the page setup with, and choose Page Setup from the File menu. Whatever settings you choose will be saved with that form when you click on the OK button in the Page Setup dialog. In this way, you can save as many different page setups as you need. If you have more page setups than forms, you may even want to create blank forms which exist for no other reason than to hold a page setup.
To use a page setup associated with a form in this way, you call the Page Setup command, and pass it the form whose page setup you want to use next. An example of how to do this is provided in the description of the command.
Command PAGE SETUP |
 |
| Q. How do I prevent 4D crashing? |
A. 4th Dimension is a very stable and reliable application, but it is dependent on a number of systems to do its work. If there are any conflicts in these systems, 4D may crash.
You should try to simplify 4D's environment as much as possible. Running other applications at the same time as 4D, or using control panels and extensions that aren't related to networking (on the Macintosh) increase the likelihood that you will see a crash. On a Macintosh 4D server, you should turn off file sharing and virtual memory, since these both slow down the system and contribute to instability. If you need to share files, either use a separate computer for this task, or turn file sharing on only when it is needed.
At times, one or more of the files in the 4D folder (the "ACI" folder in v6/v6.5), located in your Windows or WinNT directory (on the PC) or inside your Preferences folder (on the Macintosh) may become corrupted. If you experience crashes, try removing the 4D folder. On Mac, you will need to enter your ID number for most 4D applications after you do this and reinstall your Expansion disks for 4D Server (make sure you are reinstalling server with the same ID number). On the PC, you will need to reinstall your network components if you are using Client/Server 4D.
Command Removing and Re-installing NCs on Windows
Command Removing and Re-installing NCs on Macintosh
You should check that you are using the same versions of 4D client and server and network components, and that any plug-ins you are using are compatible with your 4D version and operating system. Note that you should be using 4D v6 or later of any 4D plug-ins.
If you are using 4D v6 or later and your database is converted from 4D v3 or v1.5 of 4D, you should check whether you have any plug-ins installed into your structure file and remove them. (See FAQ on Plug-ins) |
 |
| Q. What is the Universal 4DX folder? |
A. In version 6.0.x of 4D, if you wanted your database to load and use a plug-in (such as 4D_Pack, 4D Write, etc.), the plug-in was required to be placed inside of a (Mac or Win) 4DX folder that resided inside the same directory as your structure. Version 6.5 of 4D introduced the new concept of a "Universal 4DX" folder. A "Universal 4DX" folder is a (Mac or Win) 4DX folder that resides inside the 4D folder which is inside your platform's active "system folder" (WinNT folder, Windows folder, or on the Mac the System Folder:Preferences folder). Should you do an install from the version 6.5.x Product CD you will, by default, end up with a Universal 4DX folder.
The concept of the "Universal 4DX" folder is as simple as it is convenient. Now you can place all your plug-ins into it and subsequently all of your databases will be able to find and load the plug-in(s) that it requires. In other words, it is no longer necessary to have a 4DX folder FOR each database WITH each database. |
 |
| Q. What computers are most suitable for 4D Server? |
A. Apart from having a computer with enough disk space for the database application, data file, operating system, and backups, considerations about what computer to run 4D on will depend on three factors:
Speed
Stability
Total Cost of Ownership
Four generalizations can be made about all 4D server computers:
A server will run faster with more RAM, up to an amount a little larger than the total size of the data file (the amount over the size of the data file will depend on criteria such as how many clients are connected to the server, and what those clients are doing); and a server will run faster with a faster disk drive. The fastest possible disk systems available today are called RAID arrays. While they can be a little tricky to administer, they are very fast disk systems that split disk use between several drives. There are even IDE Raid subsystem now available as PCI cards.
Whether or not you are using a RAID array, the fastest disk drives available today generally use Ultra SCSI drives, usually with a special-purpose PCI SCSI card. IDE drives are less expensive.
A client-server system will run faster if it is on a faster network. Recent reductions in the cost of 100 base-T hubs and cards make it a bargain as a way of accelerating a 4D client/server system. 4D recommends in particular that even if you are currently using a 10 base-T or other network, that any server or client computers you buy should be equipped with 100 base-T cards, so that you can upgrade to this improved standard later.
A server will also run faster with a faster processor and a larger, faster, backside cache. Disk speed and size of RAM are generally more important, however.
Another issue that will arise is whether to use a Mac OS or a PC, and whether a PC should run Windows 95/98/Me or Windows NT/2000. Up until Mac OS 8.6, most Macintosh computers lost out to PCs on speed, but had quite significantly lower Total Cost of Ownership (TCO). Mac OS 8.6 appears to offer faster performance than Windows NT in some situations.
In terms of stability, a PC running Windows NT/2000 is generally a more stable. Another advantage of Windows NT/2000 is that even if 4D, or another program or service running on the machine should crash, the server will keep running. It is possible to set 4D v6/v6.5/6.7 up as a service, in which case it will be restarted automatically if it stops. A Macintosh, on the other hand, will generally lock up completely if any software program fails. Note that you only need Windows NT Workstation or 2000 Professional to run 4D Server.
Windows 98/Me is somewhere between Mac OS and Windows NT/2000 in terms of stability.
It is worth noting that Windows NT Workstation or Windows 2000 Professional is a moderately expensive piece of software (typically $200-$300 in the USA), adding it to the cost of a PC will reduce its price advantage over a Macintosh.
A significant consideration in favor of Mac OS as a 4D server, however, is that it is in general much easier, and hence cheaper, to maintain than Windows. A PC will usually run for a longer period without problems, but a serious problem with an NT-based PC can take a day or more to fix. Mac OS can generally be fixed much more quickly and easily, and with less training, than Windows. |
 |
| Q. How do I fix errors retrieving data, sorting or searching? |
A. If your code is correct but you are receiving error messages trying to search for or retrieve data, it is possible that your data file has become corrupted. This is usually due to 4D quitting unexpectedly (perhaps due to a loss of power or because of a crash), while it is part-way through saving the content of the database. In this case, part of the database will not be correctly structured for 4D to find the information it is looking for, or the content of that information may be incorrect.
You should always protect valuable data very carefully. Frequent backups are your first line of defense, and these backups should be kept in different places, and possibly even in different forms. 4D Backup is a great way to backup a 4D Server-based database. It is also a simple matter to get 4D to write all of the records from a table to a file, using SEND RECORD and RECEIVE RECORD commands, or using the Export menu command from user mode. In 4D v6.5, Triggers can easily allow you to time and date-stamp changes to a table, in which case you can regularly export the records which have changed. Some or all of these strategies should be adopted with any database containing important data.
If you are running 4D Server, the Backup plug-in, now free with 4D Server v6.5, can make automatic backups for you, and can also create a log file, which records moment- by-moment everything that has been done to the database since it was last backed up. In the event of a problem, it is a fairly easy matter to restore the backup copy of the database, and then integrate the log file, which restores the changes made since that backup. In this way, you can obtain a valid data file, which should reflect all but the last few minutes of work.
In some cases, your best efforts at backing up your data can fail, and you will need to repair a data file. Before you begin trying to fix a damaged data file, you should always make a copy of that file, just in case one of your efforts to repair it are unsuccessful, which can in some cases make matters worse. After you think you have repaired the data file, you should carefully check whether any important information has been lost, and whether you can now perform the operation that was producing an error. Once you are confident that your data file has been repaired, you can then work with the new data file and (if storage space is tight), delete the old data file. If you have somewhere to archive this file, it is often a good idea to keep it, just in case you discover later that some important data in it is now missing.
After you have decided to start trying to repair a data file, you have a few options:
4D Tools, an application included on all 4D product disks, can often repair a damaged data file. You should try its Check and Recover mode first, because it is fairly quick. Carefully check the results after it is finished. If this mode fails, a lower- level Recover by Tags is very often successful at repairing a damaged data file, but this can be a slow process, particularly on a slower computer. The time will depend on such issues as the number of indexes in the data file, but it is not uncommon for very large databases to take days to recover. For this reason, your best strategy is to run the Recover by Tags on the fastest computer with, in particular, the fastest hard disk you can.
4D's SEND RECORD and RECEIVE RECORD commands make it a very simple matter to write records to, and read records from, an external file. You could write a very short piece of code which exports the data from each table in the database to a separate file, then create a new data file and read those records back in again. If you can work out which records cause errors, you can have your code skip exporting these records. This strategy is almost always successful, although it usually requires a little coding to make it work.
Command Using Send/Receive Record to Recover, Replace or Update |
 |
|
 |
 |
|
|
 |