DBForms for MS Access to PHP + MySQL FAQ
DBForms for MS Access to PHP + MySQL Frequently Asked Questions

     This is the DBForms for MS Access to PHP + MySQL Frequently Asked Questions. If you meet any problem using the application, please read this document before contacting us. We are sure that you will easily find an answer to your question, or your problem resolve here. If not, only after that you should contact us per e-mail esupport@dbconvert.com

     Where can I learn more about MySQL and Microsoft Access databases?

MySQL - You should refer to the online manual pages which can be found at http://www.mysql.com/documentation
Microsoft Access Database (mdb)
     - Beginner's help - Microsoft Access help reference.
     - Advanced help - MSDN, (Visual Studio Documentation -> Visual Basic Documentation -> Microsoft DAO 3.60)

     After conversion I noticed that the functionality assigned for Button is not fulfilled! I click the button and nothing happens! What should I do?

     At the moment the program doesn't convert events for elements. Your can add your event code in your forms manually. For this purpose, go to the folder where your resultant forms are located. Each form is converted to a separate folder which is named in the same way as the form. Choose the folder you need. In this folder you will find "UserFunction.php" file, this file contains function header for buttons.

Function name always has prefix "Button" followed by the name of this Button.

For example:

function ButtonOrders(&$Fields)
{
//TODO: Add your code here
}

NOTE!
When working with this function remember that:
1. the path to the folder where your resultant forms are saved is as follows: ./../
2. the path to "forms" directory is as follows: ./../../forms/

For example:

You need the following functionality: You click at "View" button and "My_Form" is displayed.

Your event code should be as follows:

function ButtonView(&$Fields)
{
header("Location: ./../../forms/My_Form/My_Form.php");
return FALSE;
}

     As I can see there are two kinds of functions EVENT FUNCTION and VALUE FUNCTION. What is the difference?

     1. VALUE FUNCTION

Our program doesn't convert MS Access function. You need to convert it manually.
You can see the source function before the conversion as follows (e.g.):

//========= VALUE FUNCTION ==============
// Your function: [Orders Subform].Form!OrderSubtotal

You can create an analogue of this function in PHP and return values.

For Example:

//========= VALUE FUNCTION ==============
// Your function: "account $" & CStr(CInt([account]+[account]*[fine_in_day]*(Date()-[date])))

function FullAccountFuncion(&$Fields)
{
    $account = $Fields->GetField("account");
    $fine_in_day = $Fields->GetField("fine_in_day");
    $Date = $Fields->GetField("date");
    $DayCount = (mktime()-strtotime($Date))/86400;
    $FullAccout = floor($account+$account*$fine_in_day*$DayCount);
    $ret = "account \\$".$FullAccout;
    return $ret;
}

     2. EVENT FUNCTION

This function is fulfilled when a button is clicked.

If function returns TRUE your page will be displayed.
If function returns FALSE your page won't be displayed.

For Example:

//========== EVENT FUNCTION ============
function ButtonClickMe(&$Fields)
{
//TODO: Add your code here
return FALSE;
}

     I want to use values from a table, which is used to fill my forms with data. What can I do?

     You can accomplish this task using: $value = $Fields->GetField($FieldName), where:

$value - variable for data.
$Fields->GetField($FieldName) - special construction to get your data

     I encountered a problem with "MySQL server has gone away" error. What should I do?

     If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M). The extra memory is allocated on demand, so mysqld will allocate more memory only when you issue a big query or when mysqld must return a big result row!
     Set value to max_allowed_packet=10485760. If you using MySQLadmin select tab "my.ini Setup" and write max_allowed_packet=10485760 after line [mysqld].
     You will also get a lost connection if you are sending a packet >= 16M if your client is older than 4.0.8 and your server is 4.0.8 and above, or the other way around.

     I can't connect to MySQL server. How can I solve the problem?

     If you are using Virtual Server hosting you probably have no sufficient privileges to create new databases on the target MySQL server. For this case we recommend the following approach:

1. Ask your Virtual Server administrator to create blank database for you
2. Run DBForms for MS Access to PHP + MySQL and select this database as the conversion destination
3. Check option to overwrite existing MySQL database

When you complete these steps, the entire contents of the source MS Access database will be imported into the specified MySQL database.

In case a direct access to your MySQL base is denied, DBForms for MS Access to PHP + MySQL allows you to overcome such restrictions (e.g. you have no sufficient privileges to create new databases on the target MySQL server). You can do it through storing your data in dump file as the best way to present deferred conversion and gain more control over the conversion process. The program fixes the contents of the source database into a local dump file instead of sending it to MySQL server directly. The destination file will consist of MySQL statements to create all tables and to fill them with the data. Using this dump file MySQL server administrator will add data to your MySQL base.

        I have an error that selected collating sequence is not supported by the operation system. How can I fix this problem?

One of the following conditions is true:
1. You are trying to open a database or an object in a database that was created in another language edition of Microsoft Access.
2. You are trying to open a database that was created or compacted while the New Database sort Order was set to a value other than General.

To check the settings of the New Database Sort Order, follow these steps:
Open an existing database that was not created or compacted while the Sort Order was set to a value other than General.
IN the Tools menu, click Options, and then click the General tab. Make sure that the New Database Sort Order is set to General and then click OK.

If you are receiving the errors and setting the New Database Sort Order back to General does not resolve the problem do the folloing:
In the Tools menu select Database Utilities, and then click Compact and Repair Database.

        I have a table with a long name in my Access database, that is always shortened by convertation into MySQL. Why is it so?

There are some MySQL limits. They are listed in the following table.
See http://www.mysql.com/doc/en/Legal_names.html

Identifier Max length Allowed characters
Database 64 Any character that is allowed in a directory name except `/' , `\' or `.' .
Table 64 Any character that is allowed in a file name, except `/' or `.' .
Column 64 All characters.
Alias 255 All characters.

    Out-of-date Microsoft Jet versions and Microsoft Data Access Components

Some troubles with running the program can be caused by utilizing of the out-of-date Microsoft Jet versions and Microsoft Data Access Components. The latest versions of Microsoft products should be installed in this case. You can download them by clicking at the following links:


Microsoft Jet:

Use Jet40SP8_9xNT.exe to install Jet 4.0 SP8 on computers that are running Windows 95, Windows 98, or Windows NT 4.0.

Use Jet40SP7_WMe.exe to install Jet 4.0 SP7 on computers that run Windows Millennium Edition.

Use WindowsServer2003-KB829558-x86-ENU.exe to install Jet 4.0 SP8 on computers that are running Windows Server 2003.

Use Windows2000-KB829558-x86-ENU.exe to install Jet 4.0 SP8 on computers that are running Windows 2000.

Use WindowsXP-KB829558-x86-ENU.exe to install Jet 4.0 SP8 on computers that are running Windows XP.

Microsoft Data Access Components:

All version Windows (MDAC) 2.8

     After conversion date formatting of "mm/dd/yyyy" is replaced with "yyyy-mm-dd 00:00:00". Do you know of a way that I can retain the mm/dd/yyyy format after converting my base to MySQL?

The problem you described is caused by the MySQL server settings configuration. You can use in your queries DATE_FORMAT () function to modify date according your requirements. Additional info and documentation about this function you can find in MySQL server Manual

     Executing files uploading through FTP I encountered a problem with access rights set for remote directory. How can I fix this?

This warning can appear if you have insufficient privileges for remote FTP folder usage. In order to get the full-valued conversion of exhaustive set of form elements you need to have the highest priority for remote FTP folder. Images and other form elements from database will be saved in TMP folder which can be found due to the following scheme:



Converted images are saved in TMP folder and afterwards will be used by means of HTML code for displaying on your web page.

In case you saved your resultant files to a local folder with intention for future uploading them to FTP initially you should grant all permissions for the upload TMP directory manually. This means that if DBForms for MS Access to PHP + MySQL program couldn't grant necessary rights and authorize you to upload files in remote folder by default you have to alter its permissions to allow reading and writing to. Exactly how you should do this depends on your ftp client or server operating system.

On UNIX systems for example you set the TMP directory to a+rwx (or ugo+rwx or even 777). This can be done from a command line on your server using chmod or via your FTP client (using the Change Permissions, chmod or other Permissions dialog box, see your FTP clients documentation for help). Most FTP clients list permissions in the form of User (Read, Write, Execute), Group (Read, Write, Execute) and Other (Read, Write, Execute). You need to tick all of these boxes to set correct permissions.

On Windows system you need to ensure the TMP directory is not write-protected and that it has global write permissions (see your server's documentation or contact your hosting provider if you are unsure on how to achieve this).

Please, be aware that setting directories permissions to global write access is a potential security issue. While it is unlikely that anything horrible will occur (such as some images files being deleted) there are always people out there out to cause trouble. Therefore you should monitor this directory and if possible make regular backups.

     What is AJAX ?
Ajax, the popular term for Asynchronous JavaScript and XML, is one of the most important combinations of technologies for web developers to know these days. With its rich grouping of technologies, Ajax developers can create interactive web applications with XML-based web services, using JavaScript in the browser to process the web server response.

     I use converter demo version and get error “Foreign key constraint fails”

Due to trial version limitation (first 10 records from each table) the error “Foreign key constraint failed” may appear. This problem comes up when you copy table records with foreign key references or records protected with other constraint methods maintaining database integrity.

     I still have questions/comments about this program - Please, direct them to esupport@dbconvert.com All your feedbacks are highly appreciated.

© Copyright by DMSoft Technologies, 2001-2007.