## PgAccess - FAQ

1. When I run PgAccess I got a message complaining about the crypt library! What should I do?

> Versions of PostgreSQL prior to 6.5.1 couldn't reliably detect the presence of the crypt library on RedHat 5.x systems. That's why the libpgtcl library does not include reference to crypt. You will need to get a proper copy of libpgtcl.so library or to compile one. Go to the postgresql source directory into src/interfaces/libpgtcl and edit Makefile adding -lcrypt to the end of the line SHLIB_LINKS. Make clean and make again. Your libpgtcl.so is now prepare to run PgAccess. I strongly recommend you to upgrade to PostgreSQL 6.5.1 where this problem has been solved.

2. I cannot connect to a database from another machine

> There may be two problems here. First of all, PgAccess running on the localhost is using two PostgreSQL dependent libraries, libpq and libpgtcl. Each of them are compiled for a specific PostgreSQL version. If the PostgreSQL version running on your server is different you might experience problems. The other problem is related to access rights. On the PostgreSQL server, in data directory there is a file pg_hba.conf that will grant access rights to users based on host authentication. Ask your database administrator to check if your workstation is listed there with the appropriate access rights. Try for the beginning the 'trust' mode, allowing full access to the databases.

3. I am experiencing core dumps when trying to run PgAccess. Is PgAccess broken?

> No. There were NEVER reported crashes because of PgAccess. All of them were related to bad libraries usage. The most frequent was the installing of a new PostgreSQL on a RedHat 5.x server where the postgresql-clients rpm still exists. So, PgAccess was trying to use the old libpgtcl.so library suitable for an older version of PostgreSQL. Before installing a new PostgreSQL (either by compiling it ot by rpm packages) remove ANY TRACE of old PostgreSQL. PgAccess is fully relying on libpgtcl library in order to get access to the database so when you are experiencing that kind of problems, double-check libpq and libpgtcl libraries.

4. When I try to run PgAccess I get the following error : Application initialization failed: couldn't connect to display ""

> That kind of error was reported on some Linux RedHat 5.x systems when user has su - to root and tried to run PgAccess. Some unknown errors in login scripts are not defining the DISPLAY environment and the wish application cannot connect to the X display. Try typing `export DISPLAY=localhost:0.0` and run PgAccess again.

5. Cannot run PgAccess on a Windows machine.

> In order to use PgAccess on Windows you must have installed two libraries libpq.dll and libpgtcl.dll suitable for your Tcl/Tk package and your PostgreSQL server. Note that libraries that work with Tcl/Tk 8.0.x won't work with Tcl/Tk 8.1.x and libraries that work with 6.4.2 backend won't work with 6.5.x. So, you must properly identify your Tcl/Tk package version and your PostgreSQL version and download from the Downloads section (or pick from the win32/dll directory of PgAccess distribution) the right files. Copy them into your Windows/System directory and try again. Also, you should be able to access over the network the machine running the PostgreSQL server (try ping-ing it) and have the proper access rights to the database.

6. How much costs PgAccess?

> PgAccess is a free tool. You won't have to pay anything in order to use it. It is protected by the following copyright as PostgreSQL is. I cannot guarantee technical support but I will try to answer to your questions as much as I can.

7. I want to translate PgAccess messages for xxx language. What should I do?

> In the PgAccess distribution in lib/languages directory there are files with messages translated for different languages. Copy one of them and name it after your native language and then start editing it translating all the messages. Save it into the same directory and that's all. Don't forget to send me a copy in order to include it into the standard distribution.

8. I am receiving the following error: `message invalid command name "namespace" while executing "namespace eval Mainlib` ..."

> That means 100% that you have an older version of Tcl/Tk that don't recognize namespaces command. Please upgrade to Tcl/Tk 8.0.x minimum

9. When saving big forms with a lot of widgets and code inside, a big error message appears, PgAccess crashes, cannot recover old form, pga_forms table appears to be corrupted.

> Your form source is exceeding 8000 bytes. A PostgreSQL record cannot hold more than 8 Kb and pga_forms table is corrupted. Sorry for your work :-( , your old form cannot be recovered anymore if you don't have a backup (dumped) database. Upgrade to PgAccess 0.98.3 that will prevent saving of those big forms. In order to make your form sources smaller, define some scripts for your form initialize routines or for other big portions of code and call them from the form code with the command `Scripts::execute "Your space saving code script name"`

10. I have a dual boot machine with Linux and Windows 9x installed. PgAccess works fine from Linux but when trying to connect under Windows it says something about wrong access rights to the same database. Tcl/Tk version and PostgreSQL server version matches libpgtcl and libpq DLL's.

> Check your Windows TCP/IP configuration. If you configured the Windows TCP/IP machine address to by dynamic allocated by the server then it got another IP address, different from Linux. If you have host based authentication then you have no rights for the database. Change the Windows TCP/IP configuration and set up manually the same TCP/IP address as from Linux installation or change the pg_hba.conf configuration file from the server to allow access to the database from the whole domain not from a single IP address.